Repository navigation
perf: parse SQL off the main thread and shrink result rows - #4340
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
TextView.updateFrameIfNeededkeeps line layout when the frame width changes with wrapping off. Unwrapped lines are typeset at an unbounded width, so only wrapped lines lay out again.statehas not taken stays onpendingEditsin arrival order, and a parse commits on the main thread only while no newer edit or set up has arrived.Rowholds its id and values only, 96 to 32 bytes. Missing fields, unloaded values and export snapshots move toSparseRowStateinTableRows, keyed by row id.RowPositionsreplaces the[RowID: Int]index. Rows read in order resolve by position, and only added or reordered rows are hashed.ResultSetcopy of the buffer it shares with the tab, so that write no longer copies every row. Switching results hands the buffer back as before.Rownow read it throughTableRows, same expectations:FieldAbsenceTrackingTests,RowOperationsFieldAbsenceTests,DocumentExportDataSourceTests,ResultComparisonGridModelTests,ResultSetComparisonTests,UnloadedValueReaderTests,MaskingExportTests.Test plan
TreeSitterBackgroundParseTests(parse finishes while the main thread is blocked; an edit cancelled by a set up stays out of the new tree) andTextLayoutManagerLineWidthTests(growing the widest line keeps other lines), each run against the old source.TableRowsSparseStateTests(row stride 32) andActiveResultBufferOwnerTests(first edit keeps the buffer) check what the probe below measured on the old shapes: a 96-byte row and a copied buffer.verify.sh test(Unit plan): 32,033 passed, 0 failed.verify.sh package TableProEditor: 879 passed.layoutLines1,284 before, 363 after. Keys typed in 12 s: 113 before, 288 after.getCharacters).