many_components stress test improvements#16913
many_components stress test improvements#16913alice-i-cecile merged 16 commits intobevyengine:mainfrom
Conversation
| } | ||
| } | ||
|
|
||
| println!( |
There was a problem hiding this comment.
Should this be info! so it can be configured with the logging framework?
There was a problem hiding this comment.
I'm not sure. I see some examples use info and some use println. This example was using println already, so I just kept it consistent.
|
Needing unsafe in the benchmarks makes me feel like we could improve the API. |
it's because we're spawning things dynamically, for which I don't think we can avoid unsafe. |
d95764b to
f6b5150
Compare
|
I added a optional dependency on the tracing lib to the base Cargo.toml which is enabled with the |
Objective
Solution
insert_by_idsinstead ofinsert_by_id. This reduces the number of archetype moves and improves startup times substantially.base_system. I'm not sure why, but tracing spans weren't showing for this system. I think it's something to do with how pipe system works, but need to investigate more. The approach in this pr is a little better than the default span too, since it allows adding the number of entities queried to the span which is not possible with the default system span.Testing
cargo run --example many_components -F trace_tracy 1000000and connected with tracyShowcase
Future Work