-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize serialization for client parameters (#864)
* core: Fix doc typo Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Implement generic `ParamBuilder` for RPC parameters Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Add specialized RPC parameter builder for arrays and maps Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Implement parameter builder for batch requests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Implement `rpc_params` in the `types` crate Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Adjust `ClientT` for generic efficient parameters Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * proc-macro: Render clients using the parameter builders Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Adjust testing to the `ToRpcParams` interface Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Move `rpc_params` to core and simplify testing Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Rename server's trait to `ToRpcServerParams` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * bench: Adjust benches to the `ToRpcParams` interface Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Fix clippy Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Rename batch builder to `BatchRequestBuilder` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * examples: Re-enable proc-macro example Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Fix doc tests and add panic documentation Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Fix documentation link Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * client: Use BatchRequestBuilder as parameter for batch requests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update core/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update core/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * types: Add specialized constructors for internal `ParamsBuilder` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Implement `EmptyParams` for client's parameters Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * tests: Fix macos disabled test Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Improve comment Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Fix clippy Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * benches: Rename functions Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * types: Rename param types to `ArrayParams` and `ObjectParams` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Move paramters to core crate Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Return `core::Error` from `ToRpcParams` trait Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Fix doc link Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Fix `ArrayParamsBuilder` doc links Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Remove `ToRpcServerParams` trait Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Fix `ToRpcParams` docs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Remove `ParamsSer` and extend benchmarking Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Optimise `rpc_params` to avoid allocation on error Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * params: zero allocation for empty params Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * examples: Add copyright back Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * traits: Remove empty doc line Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update core/src/traits.rs Co-authored-by: James Wilson <james@jsdw.me> * Update core/src/traits.rs Co-authored-by: James Wilson <james@jsdw.me> * examples: Restore `proc_macro` example to origin/master Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Remove empty case for `rpc_params` macro Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> Co-authored-by: James Wilson <james@jsdw.me>
- Loading branch information
1 parent
5a2f6f1
commit 41b8a2c
Showing
32 changed files
with
785 additions
and
366 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
41b8a2c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.sync/ws_custom_headers_handshake/1kb
229695
ns/iter (± 29640
)110640
ns/iter (± 9180
)2.08
sync/ws_custom_headers_handshake/2kb
230852
ns/iter (± 34916
)110686
ns/iter (± 2479
)2.09
async/ws_custom_headers_handshake/1kb
234382
ns/iter (± 31105
)110322
ns/iter (± 3137
)2.12
async/ws_custom_headers_handshake/2kb
225692
ns/iter (± 37544
)111106
ns/iter (± 1716
)2.03
This comment was automatically generated by workflow using github-action-benchmark.
CC: @niklasad1