-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Refactor EditorNode get icon #101435
base: master
Are you sure you want to change the base?
Refactor EditorNode get 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. |
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
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.
_get_class_or_script_icon
into_get_class_icon
and_get_script_icon
.get_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.