Repository navigation
perf: run prepared async executions on the connection worker - #503
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.
|
chrispader
force-pushed
the
async-overhead/prepared-connection-worker
branch
from
November 16, 2026 15:30
3e524d0 to
e38960b
Compare
A prepared statement's executeAsync and executeRawAsync ran on Nitro's shared thread pool, which does not keep call order, so the JavaScript queue had to run them one at a time and every execution waited for the previous result. They now run on the connection's FIFO worker like executeAsync, and the queue treats them as statements, so several can be submitted without waiting. The worker still runs them one at a time in call order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrispader
force-pushed
the
async-overhead/prepared-connection-worker
branch
from
November 16, 2026 16:33
e38960b to
0a54af9
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.
A prepared statement's
executeAsync()andexecuteRawAsync()ran on Nitro's shared thread pool, which does not keep call order. The JavaScript queue therefore ran them as exclusive operations, so each execution waited for the previous result, and other async calls on the connection waited too.They now run on the connection's own worker thread like
db.executeAsync(), which runs calls one at a time in call order. The queue treats them as statements, so several executions can be submitted without waiting for each result.🤖 Generated with Claude Code