Repository navigation
perf(store): lock-gap — how big a gap between a writer's transactions lets another write in - #279
Merged
Merged
Conversation
… lets another write in With no pause after each commit, a 1 ms retry failed 8 of 20 tries and SQLite's own wait 20 of 20; 0.3 ms let the retry in every time; 2 ms let both in. Backs cli-core#2249 and #2255. 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.
Task
Publish the measurement behind WireCatLabs/cli-core#2249 (the lock test passed by luck) and WireCatLabs/cli-core#2255 (
writeBatchpauses 2 ms after each batch), with the script that produced it.Why
Those numbers were only in the two PR descriptions. The page answers how big a gap a writing loop must leave so another process's write gets in, for both cli-core's 1 ms retry and SQLite's own wait.
What
performance/store/lock-gap/: the README,bench.mjsandresults.md.performance/store/README.md.Headline (20 tries each, 20 ms hold):
Testing
node performance/store/lock-gap/bench.mjs 20 0,0.3,2producedresults.md.pnpm docs:checkfails on main already, on a link atperformance/store/README.mdthat points to a heading missing from the gcal-baseline page. It's not touched here.🤖 Generated with Claude Code