Repository navigation
perf(reports): shorten the refresh after opening an idle app for 0.9.9 - #37
Merged
Merged
Conversation
- Catch the report index up with collector pushes every hour in the background; a no-op when nothing new arrived, so idle disks stay quiet. - Share quota history and window sums between the two USD bases. - Drop the unused historical reset list from report payloads and cache. - Reuse Intl formatters in chart and table rendering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report refreshes read every quota snapshot ever collected and parsed each row's timestamps several times per view. The view worker now reads, per source account window, the latest reading plus the current and previous cycle it belongs to, and quotaView parses timestamps once per row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report cache entries no longer carry reset history, which 0.9.8 requires when restoring them. A new namespace format makes an older version clear the cache on rollback instead of disabling persistence, while this version keeps reading entries that 0.9.8 saved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
冷启动打开 PWA 或页面后,旧数据很快出现,但刷新成最新数据要 5 秒左右。线上日志显示主要有三处开销。
改动
验证
bun test tests441 通过,bun run typecheck、bun run build、所改文件 Prettier 检查与git diff --check通过。/api/view从 328 KB 降到 82 KB。以真实额度历史启动新版服务端,/api/view正常返回各账户额度状态,日志无报错,单次快照约 35 ms。未验证
🤖 Generated with Claude Code