mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
add some perf notes
This commit is contained in:
parent
b32c80ceba
commit
c3a388b1b9
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue