-
-
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
Optimize ClassDB::get_direct_inheriters_from_class
#104355
Conversation
Co-authored-by: kleonc <[email protected]>
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.
LGTM.
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.
I just unknowingly optimized the same line. This change brings down editor launch times by ~30ms for me.
The function hasn't been touched since at least 4.2 so it should be safe to cherry pick.
Thanks! |
This function shows a small hot spot in editor cold startup, it does an extra hashmap lookup to obtain value while we already know the value should be
E.value
.Before
After
To reproduce this, one need to delete
editor_data/cache/editor_doc_cache-4.5.res
, this function is used in editor doc generation.