-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Return fast for built-in class icon #101435
Conversation
b3465b1
to
c368de0
Compare
Tried this out. This fixes #98666 too. |
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.
Tested locally, it works as expected. It's faster overall but due to remaining bottlenecks, scrolling large Trees is still sluggish, especially when near the bottom.
Code looks good to me.
All tests done with an optimized editor build with theMRP from #78645.
I've also tried the MRP of this PR with 16,384 nodes (duplicated from the original 4 nodes) but couldn't spot much of a performance difference when scrolling.
Local
master
master_local.mp4
This PR
pr_local.mp4
Remote
Stutters due to Tree updates being performed every second are still present.
master
master_remote.mp4
This PR
pr_remote.mp4
This looks mostly like a cleanup, while #101489 is a complete solution. The key point is avoiding to load scripts. Still, it does not have problems I mentioned in #101489 (comment), and if it's indeed faster, then it's fine for now. The two PRs don't seem mutually exclusive. |
a454986
to
30cf85b
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.
Code looks good
Co-authored-by: Tomasz Chabora <[email protected]>
30cf85b
to
dcf5244
Compare
Unfortunately I cannot make this refactor after #101489, it will crash the editor when create node for unknown reason. But at least we can solve the performance problem first. I also found a possible regression: after creating a new script and adding Edit: This behaviour exists before #101489. (I kind of remember last month I do this test it doesn't require a scene reload but, anyway, not a big issue.) |
Thanks! |
Add a fast path for built-in class inEditorNode::get_class_icon
.#78645 MRP with 28K objects now runs smoothly, 91K objects still sucks.
Would be good if someone knows whatEditorNode::get_object_icon
does could refactor these code.Refactor get icon logic.
Split_get_class_or_script_icon
into_get_class_icon
and_get_script_icon
.Changeget_class/object_icon
to avoid multiple checking.ResourceLoader::exists
.Test with test_custom_icon.zip,
class_name
and@icon
seems to work without problem. And the performance boost remains true.Bugsquad edit: