Reduce async overhead in JS GraphBinary reads - #3630
Open
kirill-stepanishin wants to merge 1 commit into
Open
Conversation
Assisted-by: Claude Code:claude-opus-4-8
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3630 +/- ##
============================================
+ Coverage 76.35% 76.41% +0.05%
- Complexity 13424 14311 +887
============================================
Files 1012 1037 +25
Lines 60341 64670 +4329
Branches 7075 7675 +600
============================================
+ Hits 46076 49420 +3344
- Misses 11548 12175 +627
- Partials 2717 3075 +358 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
VOTE +1 |
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.
Adds a synchronous fast path to gremlin-javascript StreamReader
Every primitive read in
StreamReaderawaits#ensure(n)first. For a bufferedsubmit()response a chunk ofthe payload is already in memory, so that await often does nothing but still costs a Promise and a
microtask per read, which dominates client CPU on large responses. Reads now return right away when the bytes are already buffered and only await when the buffer needs refilling.
Performance
Cross-region EC2 (server US-EAST-2, client US-WEST-2) over HTTP, Modern graph.
g.V().repeat(both()).times(12)(~200k results)g.V()(6 results)g.V()throughput @ 64 / 256 / 1000