add some perf notes

This commit is contained in:
Carter Anderson 2020-02-04 18:48:42 -08:00
parent b32c80ceba
commit c3a388b1b9
2 changed files with 3 additions and 1 deletions

View file

@ -348,6 +348,7 @@ where
for (i, (entity, _uniforms)) in query.iter_entities(world).enumerate() {
// TODO: check if index has changed. if it has, then entity should be updated
// TODO: only mem-map entities if their data has changed
// PERF: These hashmap inserts are pretty expensive (10 fps for 10000 entities)
info.offsets.insert(entity, offset as u64);
info.indices.insert(i, entity);
// TODO: try getting ref first

View file

@ -667,7 +667,8 @@ impl<'a, 'b, 'c, 'd> RenderPass for WgpuRenderPass<'a, 'b, 'c, 'd> {
if !dynamic {
continue;
}
// PERF: This hashmap get is pretty expensive (10 fps per 10000 entities)
if let Some(dynamic_uniform_buffer_info) =
self.renderer.dynamic_uniform_buffer_info.get(&binding.name)
{