Repository navigation
perf(storage): 空闲时跳过未变化的报表缓存与账本写入 - #22
Merged
Merged
Conversation
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.
Problem
Meterleaf wrote about 6–8 GB/day to the NAS SSD even when nobody had the page open. File-level inotify counts showed where it went:
Opening the page already returns the cached result first and then refreshes in the background, so the 5-minute timer was not needed to keep the page fresh.
Changes
asOf,syncandreportStatus). An identical refresh no longer writes to the view-cache database, and the digest is also computed when the cache is restored at startup.sync_stateis written only when the value changes, and account upserts now useIS NOTfor a NULL-safe comparison. Real changes still bump the revision and fingerprint, and the report projection still picks them up.compose.yaml,.env.exampleand the deployment guide. Deployments that already set these values explicitly in.envare not affected.Verification
bun run typecheck: passes.bun test tests: 346 pass, 0 fail.bun run build: succeeds.git diff --check: no problems.total_changesunchanged; real changes still propagate.🤖 Generated with Claude Code