-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Don't search beyond Sync roots for highest priority work #13335
Conversation
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'm convinced we should fix the general issue though since even just always picking the first one is still inline with semantics and even better for a single root.
By "fix the general issue" you mean "stop prioritizing across roots" or...? |
Why is this n^2 in the first place though? |
We schedule N roots in a lifecycle.
|
Regardless of how we can optimize it, it seems like the current search procedure is useless after encountering a Sync root so I'll get this in. |
Fixes #13334 at a cost of one extra comparison per scheduled root.
Not directly observable — verified by manual testing with test cases from #13334 and #12700.
Unless I'm missing something it's useless to continue searching once we've found sync work since nothing else is going to win.