Skip to content

perf: home balance shimmer animates uncapped while offline #1747

Open

Description

@jvsena42

What happened?

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%.

(synonymdev/bitkit-ios#1168 (comment).) Android was not measured.

Expected behavior

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

  1. Open Home with a USDT balance while the USDT endpoints are unreachable, so the balance keeps updating.
  2. 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.

Bitkit Version

master 1337f12

Device / OS

Not measured on Android; numbers above are from the iOS twin.

Activity

  1. added this to the 3.2.0 milestone on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions