Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Coalesce ScrollView Messages #7260
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
Coalesce ScrollView Messages #7260
Changes from all commits
7ce39fd
da0f2ed
6ab8b73
65eb45d
a349471
3c052fb
4a7523b
1978ec3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit, I'd make this a
bool
namedqueueWasEmpty
or something like that, since you don't really care about the size, just that it was previously empty.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 think you have a bug here... if you have just 1 coalesced event in the queue, if you add a second coalesced event with the same key, you'll remove the 1 event in the erase-remove bit, and then you'll add a new event, re-registering for Rendering. Probably want to check if m_renderingRevoker already has a valid token in it before registering? So, like:
(I think revokers have an
operator bool
for this?)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.
Yes, it looks like there is a bug here. We cannot rely on the revoker though, just because it is possible we have an open batch with unregistered revoker. Seems like we can check the size before coalescing though.
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.
Given that VC++'s
deque
is pretty much useless, I would use alist
here so the behavior is more obvious to people who don't have dumb trivia about VC++ memorizedThere 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.
deque is semantically the structure we want, even if the implementation isn't great.
I'm still holding out for an official C++ ABI break where everyone goes and optimizes their data structures 😉