-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Switch to a List as the backing store for the FAR window from an ImmutableList. #73589
Conversation
? EntriesWhenGroupingByDefinition | ||
: EntriesWhenNotGroupingByDefinition; | ||
? EntriesWhenGroupingByDefinition.ToImmutableArray() | ||
: EntriesWhenNotGroupingByDefinition.ToImmutableArray(); |
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.
here we make a snapshot to actually put into TableEntriesSnapshot. But this should be ok the vast majority of hte time. We're only updating this snapshot at most 4 times a second. So the amount of copies made by this is very small (didn't show up in any measurements). And the wins we get by just working with List vs an ImmutableList (which internally is an AVL tree) is substantive.
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.
Followup to #73587.
Saves several percent on looking up into the immutable array. As well as all hte overhead involved just mutating hte immutable-list (which is an AVL tree under the covers):