Repository navigation
perf: drop promise layers around transactions - #500
Open
chrispader wants to merge 1 commit into
Open
chrispader wants to merge 1 commit into
chrispader wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The connection's transaction method and the transaction function were async wrappers around the queued operation, so every transaction resolved through two extra promises. Both now return the queue's promise directly and still reject, rather than throw, when the database is not open. The transaction callback stays async because it commits or rolls back after awaiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrispader
force-pushed
the
async-overhead/transaction-promise-layers
branch
from
November 16, 2026 16:33
77d8115 to
e7903d5
Compare
This branch was successfully deployed
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.
db.transaction()and thetransaction()helper wereasyncfunctions that only forwarded the queue's promise, so every transaction settled through two extra promises and their microtask turns. Both now return the queue's promise directly and still reject, rather than throw, when the database is not open. The transaction callback staysasync, because it commits or rolls back after awaiting.🤖 Generated with Claude Code