perf(jsonrpc): join batch response bytes instead of re-encoding - #3998
Conversation
|
Claude finished @NazariiDenha's task in 3m 5s —— View job Review:
|
PR Reviewer Guide 🔍(Review updated until commit 89de865)Here are some key observations to aid the review process:
|
cfce2b7 to
89de865
Compare
|
Claude finished @NazariiDenha's task in 1m 1s —— View job Review:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3998 +/- ##
==========================================
- Coverage 79.29% 79.18% -0.12%
==========================================
Files 465 465
Lines 35785 35794 +9
==========================================
- Hits 28377 28344 -33
- Misses 7399 7441 +42
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Persistent review updated to latest commit 89de865 |
89de865 to
d0c8359
Compare
|
Claude finished @NazariiDenha's task in 2m 50s —— View job Review:
|
Standalone PR ReviewPR-Agent could not safely update the persistent review. This standalone result will not replace the canonical review. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
d0c8359 to
cc3a4ac
Compare
|
Claude finished @NazariiDenha's task in 2m 39s —— View job Review:
|
Standalone PR ReviewPR-Agent could not safely update the persistent review. This standalone result will not replace the canonical review. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
User description
handleBatchRequestcollects each response as ajson.RawMessage, then packs together withjson.Marshal(responses). This is inefficient so this pr joins the bytes directlyNumbers
k6 against a local seoplia, batch requests at 100 VUs
blockNumbergetBlockWithTxHashesgetBlockWithReceiptsgetClass(batch of 10)PR Type
Enhancement, Tests
Description
Join batch JSON response bytes directly
Avoid re-encoding batch responses in server
Add byte-identical batch response test
File Walkthrough
server.go`
Concatenate batch response bytes manuallyjsonrpc/server.gojson.Marshalwith byte concatenationconcatBatchResponsesto build JSON array from raw messagesserver_test.go`
Test batch array matches JSON marshal bytesjsonrpc/server_test.gojson.Marshal