Skip to content

test(save): benchmark async persistence overhead - #2714

Draft
houko wants to merge 2 commits into
mainfrom
fix/issue-1733
Draft

houko wants to merge 2 commits into
mainfrom
fix/issue-1733

Conversation

@houko

@houko houko commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Refs #1733 — benchmark only; do not close the issue.

Summary

Compare synchronous file-store saves with the caller-goroutine cost of submitting asynchronous saves for a 5 MiB value. The asynchronous measurement excludes the final Flush. Record the benchmark in the existing save architecture note. No runtime or UI changes.

Remaining scope

Headers still scans full envelopes; there is no atomically associated metadata index, saved timestamp, or PNG thumbnail. File-store callbacks still run on workers and Flush has no deadline. Scope-backed storage still performs the operation inline. These are not addressed by this PR.

Verification

  • go tool nsgo check
  • go tool nsgo test ./pkg/save/... — 91 passed
  • go tool nsgo test ./pkg/save/... -run '^$' -bench 'BenchmarkSave(5MB|Async5MBEngineGoroutine)$' -benchmem -benchtime=1x
  • bun run verify-notes

@github-actions github-actions Bot added documentation Improvements or additions to documentation pkg/save area/agents size/S labels Dec 1, 2026
@houko houko changed the title Saves: slot headers listed without loading the save, and saving and loading off the engine goroutine test(save): benchmark async persistence overhead Dec 1, 2026
@houko
houko force-pushed the fix/issue-1733 branch 2 times, most recently from 143d0d4 to 250ec66 Compare December 1, 2026 02:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agents documentation Improvements or additions to documentation pkg/save size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant