perf: avoid state file frequently write to disk#446
Conversation
Greptile SummaryThis PR introduces a dirty-flag + TOML content-deduplication strategy to batch and skip redundant state-file disk writes. State mutations now go through typed helper methods that set an
Confidence Score: 5/5Safe to merge — the flush logic is correct, all mutation paths mark dirty, the background task shuts down cleanly, and the cron crash-safety window is preserved. The dirty-flag and content-deduplication paths are self-consistent: write() holds the file lock before serializing, compares against cached content, and only skips I/O when the TOML is byte-identical. The shutdown sequence cancels the background task before the force-flush, so the second flush is a no-op via content comparison. All previously raised concerns are addressed in this revision. No files require special attention. Important Files Changed
Reviews (6): Last reviewed commit: "fix(state): fix write() lock ordering an..." | Re-trigger Greptile |
14cd70d to
7b7116e
Compare
7b7116e to
087994f
Compare
No description provided.