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
view: rendering and diff performance on large sheets #2076
This content was written by an AI agent and must be verified by a human developer. After human verification, this alert may be removed.
Found in the review of #2057, which adds the experimental view. It does not block that PR; #2059 fixed the findings that did. Paths refer to #2059's head.
Summary
PR #2059 made the Rust projection linear and stopped it from running for clients that do not use the view. These costs remain on the page:
foldToFit in web/view/src/main.ts renders the whole sheet again for every fold it tries.
Dragging the split refits on every pointermove and drops the folds the user set by hand.
diffModels runs again on every selection change.
web/view/src/diff.ts finds the longest common subsequence with an n×m table. Replacing all 25,000 lines of a file inside the 256 KiB limit needs about 2.3 GiB (estimated, not measured). "Copy changes" runs synchronously, so the tab can crash. Use Myers' algorithm, or replace a large changed middle as one block.
The qualified rule of tokenize in web/view/src/formula.ts takes quadratic time on a long chain of dots: about 1 s per render at 8,000 segments.
Activity