Skip to content
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

[REST] improve performance for JSON calls #14298

Merged
merged 1 commit into from Sep 24, 2018

Conversation

Projects
None yet
8 participants
@alecalve
Copy link
Contributor

commented Sep 23, 2018

JSON calls do not use the raw data generated for the .bin and .hex calls.

By moving the raw data creation into the .bin and .hex switch branches, JSON calls' performance is improved.

Light benchmarking indicates that fetching 2000 JSON headers is ~25% faster, fetching large JSON blocks is ~4% faster.

[REST] improve performance for JSON calls
JSON calls do not use the raw data generated for
the .bin and .hex calls. By moving the raw data
creation into the .bin and .hex switch branches,
JSON calls become faster.
@promag

This comment has been minimized.

Copy link
Member

commented Sep 23, 2018

utACK 30973e9.

@Empact

This comment has been minimized.

Copy link
Member

commented Sep 23, 2018

utACK 30973e9

@laanwj

This comment has been minimized.

Copy link
Member

commented Sep 23, 2018

thanks, this is an obvious improvement, the whole point of the .bin interface is to save on conversion overhead!

30973e9

@practicalswift

This comment has been minimized.

Copy link
Member

commented Sep 24, 2018

utACK 30973e9

Nice first-time contribution!

@251Labs

This comment has been minimized.

Copy link
Contributor

commented Sep 24, 2018

utACK 30973e9

nice one!

@MarcoFalke MarcoFalke merged commit 30973e9 into bitcoin:master Sep 24, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

MarcoFalke added a commit that referenced this pull request Sep 24, 2018

Merge #14298: [REST] improve performance for JSON calls
30973e9 [REST] improve performance for JSON calls (Antoine Le Calvez)

Pull request description:

  JSON calls do not use the raw data generated for the .bin and .hex calls.

  By moving the raw data creation into the .bin and .hex switch branches, JSON calls' performance is improved.

  Light benchmarking indicates that fetching 2000 JSON headers is ~25% faster, fetching large JSON blocks is ~4% faster.

Tree-SHA512: 433552c89bac2469d041b48a4a991d5443e4026a3ad7dc5621685386029f22826484218642fa5130c268349a55524ecbc4e30d64c867bd6632e0edd24370cf11

@alecalve alecalve deleted the alecalve:improve_rest_json_performance branch Sep 24, 2018

mempko added a commit to meritlabs/merit that referenced this pull request Sep 26, 2018

Faster RPC calls when returning JSON.
This is a change from downstream bitcoin: bitcoin/bitcoin#14298

@fanquake fanquake referenced this pull request Oct 1, 2018

Merged

[0.17] Backports #14328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.