-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved automatic view creation heuristic, major speedup for scenes with many entities #4874
Conversation
…nent won't do it alone anymore)
df90c70
to
7af18e4
Compare
…pace-view-heuristics
…pace-view-heuristics
And fix broken autogen warning.
…into account for 3d space views
Size changes
|
…pace-view-heuristics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I find this so much easier to reason about than the old implementation.
Most of my complaints aren't with this change, so much as the fact that it's now easier to see and discuss what I think are flawed heuristics in and of themselves. For merge-sanity I'm totally happy to defer any of those other changes to future-work now that we have this much cleaner framework for discussing the behavior in a per-space-view context.
return Default::default(); | ||
}; | ||
|
||
let visualizer = TVisualizer::default(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The need to instantiate this feels weird to me but I'm guessing the self
in the signature stems from some context where we need to dynamically dispatch across a set of visualizers instead of being templated on <TVisualizer>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah all these self-passings are about object safety really. We'd like this to be static but Rust makes this messy
…es_per_visualizer
…pace-view-heuristics
What
What space views get spawned is no longer determined by a centralized heuristic, but instead by one distributed to each space view class. Each of those heuristics can make much better use of existing information provided by store subscribers.
Significant speedup for scenes with many entities (100+):
opf --no-frames
before:
App::update
39.0ms, of whichdefault_created_space_views
10.4msafter:
App::update
27.4ms, of whichdefault_created_space_views
0.17mspython/tests/many_entities (1000 individual points)
before:
App:::update
151ms, of whichdefault_created_space_views
124msafter:
App::update
22.6ms, of whichdefault_created_space_views
0.06ms(still pretty bad, but less so and for different reasons now!)
(numbers from my macbook on a release build. Actual numbers might differ by now, these are from last week. )
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io