kirill-stepanishin opened a new pull request, #3630:
URL: https://github.com/apache/tinkerpop/pull/3630

   Adds a synchronous fast path to gremlin-javascript StreamReader
   
   Every primitive read in `StreamReader` awaits `#ensure(n)` first. For a 
buffered `submit()` response
   the payload is already in memory, so that await 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.
   
   | Workload | Before | After | Change |
   | --- | --- | --- | --- |
   | `g.V().repeat(both()).times(12)` (~200k results) | 2.714 s | 2.085 s | 
**~23% faster** |
   | `g.V()` (6 results) | 0.054 s | 0.056 s | no change |
   | `g.V()` throughput @ 64 / 256 / 1000 | 1226 / 2490 / 2396 req/s | 1212 / 
2633 / 2438 req/s | no change |
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to