You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Each range down to the last row creates a vertex per cell and uses about 300 MB #1893
A finite range keeps one vertex in the dependency graph for every cell between its corners, empty or not. A range from some row down to the last row of the sheet, such as =SUM(J42:J1048576), therefore creates about a million vertices, even when the column holds only a few values.
Workbooks imported from Excel often contain such ranges, written to cover "everything below the header". A whole-column range (J:J) does not have the cost, but it cannot start below row 1, and J42:J is not supported (#1651).
Steps to reproduce (Node.js, node --expose-gc repro.js):
Measured on 3.2.0, on an empty sheet apart from the formulas:
Formulas
Range
Heap used
Build time
1
B42:B1048576
311 MB
3.7 s
2
B42:B1048576, C42:C1048576
696 MB
9.1 s
4
B42:B1048576 … E42:E1048576
1,175 MB
16.4 s
4
B:B … E:E
2 MB
0.08 s
Expected: a range that runs to the bottom of the sheet costs about as much as the whole-column range covering it. Actual: about 300 MB and several seconds per range, so a workbook with a few dozen such ranges runs out of memory.
Video or screenshots
None.
Demo
The script above.
HyperFormula version
3.2.0 (the range handling is the same on develop)
Your framework
None (plain TypeScript, in a browser add-in)
Your environment
Node.js 26 on Linux for the measurements; the same failure in Chrome and in Excel's embedded browser.
Activity