-
Notifications
You must be signed in to change notification settings - Fork 627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(SQS): switch to a more performant JSON lib #7065
Conversation
NIce job! If we want to completely eliminate this time, we can also switch to using one of the JSON libs that code-gens deserialization logic. (So it all stays on stack, no reflection/runtime tricks, and minimal heap allocation. This is where all time goes in traditional unmarshalling) |
Should we make an issue to use this in the SDK for import/export genesis? |
* refactor(SQS): switch to a more performant t JSON lib * godoc (cherry picked from commit 6506d0d) # Conflicts: # go.mod # ingest/sqs/chain_info/repository/redis/redis_chain_info_repository.go # ingest/sqs/domain/router.go # ingest/sqs/pools/repository/redis/redis_pools_repository.go # ingest/sqs/router/repository/redis/redis_router_repository.go # ingest/sqs/router/usecase/routertesting/parsing/mainnet_pools.go # ingest/sqs/router/usecase/routertesting/parsing/mainnet_pools_test.go # ingest/sqs/system/delivery/http/system_http_handler.go # ingest/sqs/tokens/usecase/tokens_usecase.go
* refactor(SQS): switch to a more performant t JSON lib * godoc (cherry picked from commit 6506d0d)
* refactor(SQS): switch to a more performant t JSON lib * godoc (cherry picked from commit 6506d0d) Co-authored-by: Roman <[email protected]>
…7070) Co-authored-by: roman <[email protected]>
|
Closes: #XXX
What is the purpose of the change
Based on profiling, JSON unmarshaling is a big bottleneck in SQS. Accordingly, we switch the library to a more performant one - https://github.com/json-iterator/go
Based on the new profile, the overall share of the unmarshaling is not as large as before.
Additionally, load testing shows an improvement.
Old load testing:

New load testing:

Old profile (incomplete):

New profile:

Testing and Verifying
This change is already covered by existing tests, such as (please describe tests).
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)