You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: home balance shimmer animates uncapped while offline #1747
The Home balance shimmer animates at the full display refresh rate for as long as the balance is updating. BalanceShimmer (BalanceHeaderView.kt:298) drives the sweep with rememberInfiniteTransition + infiniteRepeatable(tween(SHIMMER_SWEEP_MILLIS)), with no frame cap. Offline, the balance stays in the updating state indefinitely, so the redraw cost lasts as long as the user stays on Home.
The iOS twin measured this. On the iPhone 17e simulator, offline on Home:
uncapped (60 fps): app CPU 5.5%, backboardd 7.7%;
capped at 30 fps: app 6.6%, backboardd 5.3%;
master, without the shimmer: app 1.9%, backboardd 0.05%.
The shimmer's cost while offline stays small, for example a capped frame rate, or a static dim after a few sweeps while the balance keeps updating (as Reduce Motion already does on iOS).
Steps to Reproduce
Open Home with a USDT balance while the USDT endpoints are unreachable, so the balance keeps updating.
Leave Home open and watch app CPU (adb shell top -p $(pidof to.bitkit.dev)) against the same screen after the balance settles.
Logs / Screenshots / Recordings
Code: BalanceHeaderView.kt:298-316 on master. Shipped in #1729.
Activity