-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Improve time to close scene with many 3D gizmos #94698
Conversation
Didn't notice this earlier, but it looks like |
I tested these modifications and I confirm that it helps a lot with the performance on opening and closing a scene from the editor. Made a little MRP with 10000 cubes in the scene 100x100x10.tscn: Opening the scene: Closing the scene: Careful, don't open another scene before testing because the performance will degrate caused by |
I think it will be more performant to keep the |
Changed EditorNode3DGizmoPlugin::current_gizmos from List to HashSet, to avoid having to iterate through all gizmos when ~EditorNode3DGizmo unregisters itself.
9335a11
to
4d0e2ee
Compare
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.
Everything sounds good to me.
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.
Code changes make sense to me.
Thanks! |
Changed
EditorNode3DGizmoPlugin::current_gizmos
fromList
toHashSet
, to avoid having to iterate through all gizmos when~EditorNode3DGizmo
unregisters itself. Fixes the scene closing slowness in #94648