diff options
| author | Adam Soltys <[email protected]> | 2026-09-03 21:58:34 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-03 21:58:34 -0700 |
| commit | e5b531f9b871125235da370c15f5de8646e68125 (patch) | |
| tree | d054b2984687c3cafe1dd07523dbf5dd4865cda7 /tools/sync-split-test.js | |
| parent | 86fb1018bd11c2ba7e333007748fb076c046bce3 (diff) | |
| download | coinosv3-e5b531f9b871125235da370c15f5de8646e68125.tar.gz coinosv3-e5b531f9b871125235da370c15f5de8646e68125.zip | |
The post-refresh drag stops lurching: ark's state persistence was the stall. Every _save() — fired dozens of times during a boot reconcile — did a JSON.parse of stored state, a merge over every vtxo and movement, a JSON.stringify, a synchronous localStorage write, and saveCache(). A CPU profile of the first 9s pinned it: ~230ms in saveFeatureState/loadFeatureState/setItem bursts blocking the main thread, which delayed the mouse drag's scrollLeft writes (mouse drag is main-thread; touch scrolls on the compositor). The in-memory state is always current and every live read uses it, so the disk write is now coalesced — immediate when idle, one write ~200ms after a burst settles (800ms cap), flushed on page-hide and wallet switch so nothing is lost
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'tools/sync-split-test.js')
0 files changed, 0 insertions, 0 deletions
