aboutsummaryrefslogtreecommitdiffstats
path: root/tools/sw-reload-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-11-06 21:59:36 -0700
committerAdam Soltys <[email protected]>2026-11-06 21:59:36 -0700
commit9886d4f1f51a6f0671d68ac3ba115e02b27ed474 (patch)
tree6c516be871b4346dfb0210febfd335b5abf46c1a /tools/sw-reload-test.js
parent31c4598795932b62f5cb5a7e69088561caacb7bf (diff)
downloadcoinosv3-9886d4f1f51a6f0671d68ac3ba115e02b27ed474.tar.gz
coinosv3-9886d4f1f51a6f0671d68ac3ba115e02b27ed474.zip
The wallet paints its balance without deep-copying the whole ark state five to seven times on every launch. "Its so slow to load … I'm using the apk. Compared to Minibits or something its way slower" (a user, 2026-11-05): profiled on Adam's Pixel 9 over DevTools, a launch kept the main thread pegged for ~1.7 s, and 1.4 s of it was loadArkState — every arkStateNow() during the first render (balance, history, notices, the Spending figures) structured-cloned the stored state, ~1 MB on a wallet with deep coins, ~220 ms per copy, before the manager connected and its live state took over. ArkStore.peek() hands back the stored object itself (before the store opens, or on localStorage, the parse is kept until the key is next written); wallet.peekArkState() is loadArkState through it, with the misfiled-state repair still going through loadArkState and each object's owner decoded once; arkStateNow and arkWanted read through it — read-only, as they already were with the live ark.state. Same boot on the phone, live tab with the local build: main-thread busy over the first 4 s 3.7 s → 1.8 s, no pegged stretch. tools/ark-store-test.js: peek returns the same object, sees writes at once, and drops a kept localStorage parse on write
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'tools/sw-reload-test.js')
0 files changed, 0 insertions, 0 deletions