Commit 6800302
committed
fix(xterm): patch IntersectionObserver retention via juspay/xterm.js fork
Bumps the pnpm override pointer from `fix/dispose-leaks-built` to
`fix/kolu-xterm-fixes-built`, which stacks a second fix on top of
the existing dispose-leaks patches:
- xtermjs/xterm.js#5817 (`fix/dispose-leaks`): register
CursorBlinkStateManager + _pausedResizeTask disposables. Already
in production.
- xtermjs/xterm.js#5821 (new, `fix/intersection-observer-weakref`):
wrap `this` in a `WeakRef` inside `RenderService`'s IntersectionObserver
callback. `observer.disconnect()` on our side wasn't releasing the
callback in practice — heap snapshot showed 175,594 retained
Uint32Arrays (~220 MB / 30 mode-toggles with 7 terminals) traced
through the global IntersectionObserver registry → callback closure
→ RenderService → BufferService → BufferLines. WeakRef breaks that
chain regardless of why the native registry held the callback.
Local measurement on kolu@zest (fresh tab, 30 canvas↔focus toggles,
7 terminals restored):
Before fix → After fix
Task Manager Memory Footprint +367 MB → -3 MB
BufferLine (Z1) instances Δ +175,594 → ~0
Upstream tracking: xtermjs/xterm.js#5820 (issue),
xtermjs/xterm.js#5821 (PR). Fork consumption will collapse to a plain
version bump once upstream merges + releases.1 parent 34b4d7f commit 6800302
3 files changed
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments