Skip to content

Commit c080264

Browse files
sunnylqmclaude
andcommitted
perf(android): move state persistence off the UI thread (AN-1)
switchVersion/markSuccess/setUuid/setLocalHashInfo only read/modify SharedPreferences via a synchronous commit(); they were dispatched to the UI thread purely to serialize them. markSuccess runs on every cold start, so its blocking disk write on the main thread caused jank/ANR on low-end devices. Add StateSerialRunner (a dedicated single-thread executor) that preserves the same serialization + commit() persistence guarantees while keeping the disk I/O off the UI thread. reloadUpdate/restartApp remain on UiThreadRunner since reload is a genuine UI operation. Also adds CODE_AUDIT.md documenting the full P0-P2 audit and remediation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent dea9493 commit c080264

3 files changed

Lines changed: 459 additions & 8 deletions

File tree

0 commit comments

Comments
 (0)