-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Avoid sorting CallableCustomMethodPointers by their actual address values #72346
Conversation
Switched to a cleaner fix that just uses Because of how byte ordering works on little-endian machines, this will cause pointer digits to be compared from right to left, so they will no longer be sorted in a meaningful order. |
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.
My "backwords" wasn't a typo, but, fun enough, "backwards" means the same in this context. 😃
It failed CI, so I had no choice 🙃 |
Thanks! |
#69874 is caused by signals being stored inside a
VMap<Callable, ...>
. This means thatCallable
s that are allocated later would have a larger address and end up being sorted to the end of theVMap
, making them easier to push/pop... until the C runtime starts recycling addresses, and connecting/disconnecting lots of signals becomes inexplicably slow.This patch "fixes" that problem in that it makes connecting/disconnecting consistently slow, so that signal performance problems become easier to diagnose.