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
MergeTree: Make SortedSegmentSet Iterative and Add Some Tests #11605
MergeTree: Make SortedSegmentSet Iterative and Add Some Tests #11605
Conversation
| @@ -42,5 +42,5 @@ | |||
| "unaugmented" | |||
| ], | |||
| "editor.detectIndentation": true, | |||
| "editor.insertSpaces": false, // Use detectIndentation instead | |||
| "editor.insertSpaces": true, // Use detectIndentation instead | |||
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 was having problems with my editor defaulting to tabs, this seemed to help. editor.detectIndentation will still override it, but it must use insertSpaces when it is not sure, like in a new file
⯅ @fluid-example/bundle-size-tests: +16.53 KB
Baseline commit: fe10534 |
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.
looks good. I wonder if we could get some better code re-use between SortedSegmentSet and partial lengths. The fact that segments' ordinals can change but they must remain stable is still enough for them to satisfy reasonable comparator invariants, and from there it's a pretty generic data structure.
interesting! i hadn't thought about that. you should open an issue and describe the overlap between the two, as if we can share code i'd love to get it scheduled |
sounds good. I tracked this internally in AB#1663 and put it in next sprint. Could be a nice ramp-up task and works toward our code size quality goals. |
Description
This is related to #11603 and #1009. Like the merge tree walk functions the recursiveness here was also causing perf issue when trying during undo, which frequently adds and removes items from a SortedSegmentSet via a tracking group. There were no directly test for SortedSegmentSet, as it was mainly tested via tracking groups, so adding a couple tests. Additionally, using a SortedSegmentSet with an object that provided a segments {segment: ISegment} was broken previously. This change also fixes that issue by allowing multiple elements with a match ordinal.
AB#151