Repository navigation
perf: reduce monitoring and MessagePack decoding overhead - #194
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Two repeated costs remain in the queue hot paths: idle monitoring rescans every active job for each queue, and MessagePack prototype-key detection scans frame bytes in JavaScript. This change aggregates active counts within a monitoring pass, invalidating them after synchronous callbacks, and uses a bounded native Buffer search before the existing safe decoder path.
Native alternating A/B measurements found 12.38% less time for a 2,000-job TCP PUSH/PULL/ACK sequence with 64 KiB payloads. Event-free monitoring passes improved 25.23x at 100 queues/10,000 active jobs and 321.78x at 1,000 queues/100,000 active jobs. These are workload-specific results; single-queue monitoring added about 24 ns, and small-payload results were inconclusive. The faster SQLite batching prototype was rejected because it changed failure and durability boundaries; SQLite runtime is unchanged.
The engineering article, technical report, captured samples, checksums, exact runtime patch, and reproduction harnesses accompany the two runtime changes. No existing test, fixture, runner, or test configuration was changed: all 1,558 protected paths remain byte-identical.
Validation on the retained runtime:
bun run test:sandbox: unit 11,931 pass / 0 fail / 404 skip; TCP 553/0; embedded 349/0; no anomalies.bun run test:sandbox:sdk: 1,557 pass / 0 fail / 3 skip across all six external SDK suites; no anomalies or survivors.bun run test:model: 12/0 with 100,418 assertions, seed 20261115.bun run typecheck,bun run format:check,./init.sh, immutable-file checks, and whitespace checks passed.No package version bump or package publication is included. Full provenance and limitations are in
docs/benchmarks/performance-stability-2026-11-15.md.Source commit
009f20dfpassed CI run 43736304149 on attempt 1: all 26 CI jobs succeeded, with nine expected release skips. Unit tests: 12,066 pass / 0 fail / 400 skip; TCP: 553/553; PostgreSQL 16/17/18.6: 571 pass / 0 fail / 1 skip each. A documentation/state-only closure records these results without changing executable source or tests.