aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-03 21:58:34 -0700
committerAdam Soltys <[email protected]>2026-09-03 21:58:34 -0700
commite5b531f9b871125235da370c15f5de8646e68125 (patch)
treed054b2984687c3cafe1dd07523dbf5dd4865cda7 /src/api.js
parent86fb1018bd11c2ba7e333007748fb076c046bce3 (diff)
downloadcoinosv3-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 'src/api.js')
0 files changed, 0 insertions, 0 deletions