-
Notifications
You must be signed in to change notification settings - Fork 276
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
Optimize performance by skipping scene update when possible #1037
Conversation
Ray queries (performed every time the mouse moves) had a negative performance impact caused by gazebosim/gz-rendering#415 This commit prevents repetead calls to IgnRenderer::ScreenToScene to perform unnecessary performance degradation since calling ClosestPoint(true) the first time during the frame is enough Code will not compile until PR gazebosim/gz-rendering#415 is merged Signed-off-by: Matias N. Goldberg <[email protected]>
Note: As I'm studying a few changes I noticed we may be able to optimize it back to pre gazebosim/gz-rendering#415 levels by calling This would cause mouse events to lag behind by 1 frame; but no update of scene would be required (thus no extra CPU needed). Without gazebosim/gz-rendering#415; gazebo's GUI is currently operating on data that is behind by 1 frame anyway. |
Note that from Fortress, |
@darksylinc , are you still working on this? |
I forgot about this but because I thought it was already merged. If I understand correctly this code should be ported to MinimalScene now? |
Yes, please 🙇🏽♀️ You're welcome to leave the code in |
|
Summary
Ray queries (performed every time the mouse moves) had a negative
performance impact caused by
gazebosim/gz-rendering#415
This commit prevents repetead calls to IgnRenderer::ScreenToScene to
perform unnecessary performance degradation since calling
ClosestPoint(true) the first time during the frame is enough
Code will not compile until PR gazebosim/gz-rendering#415 is
merged
Signed-off-by: Matias N. Goldberg [email protected]
Summary
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge