feat: migrate account and network selectors to native list - #13209
feat: migrate account and network selectors to native list#13209huhuanming wants to merge 21 commits into
Conversation
73dbb20 to
59768b3
Compare
59768b3 to
52fdb1b
Compare
|
NativeList 性能验收更新(2026-09-07):已落地头像 URI / 磁盘缓存、账户与网络重复计算优化、缓存及原生 Cell 保留量限制,并修复生产 Desktop 的头像 Worker 启动问题。稳定滚动多数样本接近目标刷新节奏,但冷打开及首次滚动仍存在卡点,尚不能判定三端全场景满帧。 完整测量条件、原始证据索引、历史基线和构建来源见性能报告(固定版本)。本文汇总已保存的实测结果,不代表重新测量了当前整个 PR 分支。 测试范围是账户选择器的钱包侧栏、账户列表,以及网络选择器的所有网络、单一网络列表。V1 代码和原路由名称/参数保留,迁移使用 V2。
已完成的优化及可复用范围:
滚动 FPS 汇总如下,每个原生/开发版列表有 3 个样本;生产 Desktop 是账户、钱包各 1 个样本,每个样本 3 轮往返:
平均 FPS 不能代替卡顿检查,最差间隔和长任务如下:
冷打开仍未达标。下表是选择器/新钱包页面打开的三轮结果,不是完整应用进程冷启动:
Desktop 生产版的弹窗打开/三个新钱包切换,在约 81.8 / 96.6 / 85.4 / 76.1 ms 的首个成功检查点达到可见头像、目标账户及相应金额就绪;检查间隔为 100 ms。最大帧间隔为 42.0 / 40.9 / 32.7 / 33.4 ms,前两个样本各有一个 50 ms 长任务。弹窗此前已预热;新钱包的服务构建次数事前为 0,但未事前检查这些头像磁盘键,因此不能宣称进程冷启动或磁盘冷缓存通过。记录的 15 条控制台错误均独立对应不支持的 闪烁、像素和内存结果:
剩余卡点已分别记录,尚未关闭:
可复用能力包括 NativeList 虚拟化、稳定 key/增量更新、图片调度、索引手势与 Cell 复用。余额聚合、账户格式化、网络选择计算、账户缓存容量属于选择器业务优化;其他业务可继续复用通用列表,而不依赖钱包服务。 校验及构建来源:账户/网络聚焦测试 18 + 10 通过;file-Worker 启动的 8 个行为分别验证 src/lib,既有 9 个调度测试、严格 TypeScript、207 文件 pristine patch 重放通过;提交检查通过。原生构建曾因 web-embed OCI 404 使用本地回退,不能称为干净的远程缓存命中。生产 renderer 构建 原生/开发版后续样本保留 |
…v' into codex/native-list-integration-env
The account selector's wallet sidebar/accounts and the all-network/single-network selectors now use NativeList V2. V1 components and existing route names/parameters remain available for rollback. NativeList/native-image gaps are implemented through the repository's pinned 3.0.105 patches.
Account avatars now use stable URIs, native/Worker generation and persistent caching. The follow-up removes duplicate account/network calculations, coalesces value publications, prioritizes visible avatars, bounds pending disk work and limits account-list cache/group retention. Generic list/image scheduling stays in the module; balance aggregation and network-selection rules remain in selector business code.
Validation and current limits:
Controlled account/network tests pass (18 + 10); the file-Worker repair passes eight startup behaviors against each src/lib entry, nine existing scheduling tests, strict TypeScript and 207-file pristine patch replay. The patch and report pass
yarn agent:check --profile commit. Both native build runs reported the web-embed OCI 404 and succeeded using local fallback, not clean remote-cache hits. This PR remains a draft while the listed runtime failures are investigated.Full measurement conditions, portable tables, provenance and reuse boundaries: NativeList selector performance report.