Repository navigation
Description
Description
-
Version: v0.23.0 and v0.22.0 (AppImage, Electron 42.1.0); compared against v0.17.1 (AppImage, Electron 15.4.0)
-
OS: Ubuntu 24.04.5 LTS, GNOME 46, Wayland, fractional scaling 112.5 %
-
Issue Description:
Switching to a tab that holds a document with large tables blocks the UI for several seconds. Clicks on other tabs appear to do nothing until the render finishes. In 0.17.1 the same switch was under one second. Switching away from the large document is fast, and small documents switch quickly in both versions. It looks as if the document is fully re-rendered on every tab activation instead of being kept or cached.This is related to, but not the same as, Improve performance with large files #3640 (large-file performance) and [Linux] Opening large documents is very slow in v0.20.0-rc.1 #5115 (opening large documents). Those cover the initial open; this one is about every tab switch after the file is already open.
Steps to Reproduce
- Generate
large-table.mdwith the script below (482 lines: four sections with 115-row, six-column tables; each row contains one link). - Open
large-table.mdand a smallsmall.mdin one window. - Switch from
small.mdtolarge-table.mdby clicking its tab.
import random
random.seed(1)
L = ["# Large table test\n"]
for s in range(4):
L.append(f"\n## Section {s+1}\n\n| # | Item | Owner | Reviewer | Date | Status |\n|---:|---|---|---|---|---|")
for i in range(115):
n = s*115 + i + 1
L.append(f"| {n} | [repo-{n%40}#{1000+n}](https://example.com/repo-{n%40}/pull/{1000+n}) feat: change number {n} with some descriptive text | user{n%23} | user{(n*7)%23} | 2026-10-{1+n%20:02d} | {'merged' if n%3 else 'open'} |")
open("large-table.md", "w").write("\n".join(L) + "\n")Expected Behavior
Switching to an already-open document is about as fast as in 0.17.1 (well under a second).
Actual Behavior
Measured from a tab click (dispatched on the tab element) until the tab is active and two animation frames have been painted, using separate fresh profiles (--user-data-dir) for each version on the same machine:
| Switch to | v0.17.1 | v0.22.0 | v0.23.0 |
|---|---|---|---|
large-table.md (≈12,000 DOM nodes) |
0.51 s | 3.02 s | 3.09–3.24 s |
small.md |
0.08–0.10 s | 0.05 s | 0.05 s |
With a real-world document of about 450 table rows (≈19,000 DOM nodes) the difference is 0.7–0.9 s (v0.17.1) against 9.5 s (v0.22.0) and 8.2–8.5 s (v0.23.0).
During the delay the window does not respond to further clicks, so tab switching feels broken.
Activity
Jocs commentedon Oct 21, 2026
Chould you please paste a demo document to help fix this issue.
mbrettschneider commentedon Oct 21, 2026
I built #4942 locally and it fixes this.
Both builds were made with
electron-vite buildfrom source on the same machine: the PR head523e128band its merge base on develop,3e9e91c2. The test is the same as above: switch fromsmall.mdtolarge-table.md(generator script in the issue description), with a fresh profile (--user-data-dir) per run, three runs each:large-table.md(≈12,000 DOM nodes)3e9e91c2523e128bThe document renders completely in both builds (same DOM node count), so the PR doesn't speed things up by rendering less. With the real-world document mentioned above (≈19,000 nodes), the PR build switches in 0.56–0.59 s, against 8.2–8.5 s in v0.23.0.
This also supports the idea that the cost is superlinear. In v0.23.0, 1.56× the nodes took 2.7× as long, which matches the repeated reference-definition collection and token-walk concatenation that #4942 removes. #4946 (progressive mounting) does not seem to be needed for this case.
It would be great to see #4942 in the next release.
Jocs commentedon Oct 26, 2026
Fixed by #4942, merged into develop. Thanks for verifying the fix and sharing the benchmarks! This will be included in the next release.