Repository navigation
Current region: grow past 10,000 rows, in linear time - #151
Merged
h-a-n-a-s-h-i merged 1 commit intoOct 10, 2026
Merged
Conversation
current_region (Ctrl+A, and the range that sort, filter, AutoSum, tables and Get Data use when one cell is selected) grew the region one ring of cells per step and stopped after 10,000 steps, rescanning every cell of the ring each time. With 20,000 rows of data and one cell selected, data.sortDescending sorted only the first 10,001 rows and left the rest as they were; a 100,000-row region took 30 s and was cut at row 10,001. It now grows one side at a time while the line next to that side has data (diagonals included), checking only the cells of that line, with no step limit.
Member
|
Landed — thank you for the contribution! Linear-time current region is a great fix for tall data. If you haven't already, please come join us on Discord: https://discord.gg/artcraft |
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.
selection::current_regionis the range Ctrl+A, sort, filter, AutoSum, tables and Get Data use when one cell is selected. It grew the region by one ring of cells per step, rescanning every stored cell inside the ring each time, and gave up after 10,000 steps. With 20,000 rows of data in A1:B20001 and A2 selected,data.sortDescendingsorted only rows 2–10,002 and left the rest as they were (A2 became 10001, not 20000). A 100,000-row region took 30 s and was cut at row 10,001.It now grows one side at a time while the line next to that side has data (diagonals included), checking only the cells of that line, with no step limit. The same 100,000 × 100 region takes well under a second.
selection::tests::regions(20,000 rows) fails before the change (A1:B10006).date.rslint), the workspace tests, assets, layers and parity pass.