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

API Marshaler: Add generated marshalers for RESTJSON protocol #1547

Merged
merged 3 commits into from
Sep 25, 2017

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Sep 25, 2017

Updates the RESTJSON protocol marshalers to use code generation instead
of reflection based marshaling. These changes improve the performance of
the SDK's marshaling in both time (CPU), number and size of allocations.

The following benchmark shows a relative difference between the SDKs
previous marshaling of RESTJSON performance and the performance with the
generated marshaling.

benchmark                                                   old ns/op     new ns/op     delta
BenchmarkRESTJSONBuild_Complex_ETCCreateJob-4               105896        36199         -65.82%
BenchmarkRESTJSONBuild_Simple_ETCListJobsByPipeline-4       8246          5085          -38.33%
BenchmarkRESTJSONRequest_Complex_CFCreateJob-4              318451        215346        -32.38%
BenchmarkRESTJSONRequest_Simple_ETCListJobsByPipeline-4     133614        126604        -5.25%

benchmark                                                   old allocs     new allocs     delta
BenchmarkRESTJSONBuild_Complex_ETCCreateJob-4               327            239            -26.91%
BenchmarkRESTJSONBuild_Simple_ETCListJobsByPipeline-4       67             50             -25.37%
BenchmarkRESTJSONRequest_Complex_CFCreateJob-4              686            598            -12.83%
BenchmarkRESTJSONRequest_Simple_ETCListJobsByPipeline-4     245            228            -6.94%

benchmark                                                   old bytes     new bytes     delta
BenchmarkRESTJSONBuild_Complex_ETCCreateJob-4               24112         19992         -17.09%
BenchmarkRESTJSONBuild_Simple_ETCListJobsByPipeline-4       3728          3765          +0.99%
BenchmarkRESTJSONRequest_Complex_CFCreateJob-4              74537         70378         -5.58%
BenchmarkRESTJSONRequest_Simple_ETCListJobsByPipeline-4     49721         49764         +0.09%

@jasdel jasdel self-assigned this Sep 25, 2017
@jasdel jasdel requested a review from xibz September 25, 2017 20:07
Updates the RESTJSON protocol marshalers to use code generation instead
of reflection based marshaling. These changes improve the performance of
the SDK's marshaling in both time (CPU), number and size of allocations.

The following benchmark shows a relative difference between the SDKs
previous marshaling of RESTJSON performance and the performance with the
generated marshaling.

```
benchmark                                                   old ns/op     new ns/op     delta
BenchmarkRESTJSONBuild_Complex_ETCCreateJob-4               105896        36199         -65.82%
BenchmarkRESTJSONBuild_Simple_ETCListJobsByPipeline-4       8246          5085          -38.33%
BenchmarkRESTJSONRequest_Complex_CFCreateJob-4              318451        215346        -32.38%
BenchmarkRESTJSONRequest_Simple_ETCListJobsByPipeline-4     133614        126604        -5.25%

benchmark                                                   old allocs     new allocs     delta
BenchmarkRESTJSONBuild_Complex_ETCCreateJob-4               327            239            -26.91%
BenchmarkRESTJSONBuild_Simple_ETCListJobsByPipeline-4       67             50             -25.37%
BenchmarkRESTJSONRequest_Complex_CFCreateJob-4              686            598            -12.83%
BenchmarkRESTJSONRequest_Simple_ETCListJobsByPipeline-4     245            228            -6.94%

benchmark                                                   old bytes     new bytes     delta
BenchmarkRESTJSONBuild_Complex_ETCCreateJob-4               24112         19992         -17.09%
BenchmarkRESTJSONBuild_Simple_ETCListJobsByPipeline-4       3728          3765          +0.99%
BenchmarkRESTJSONRequest_Complex_CFCreateJob-4              74537         70378         -5.58%
BenchmarkRESTJSONRequest_Simple_ETCListJobsByPipeline-4     49721         49764         +0.09%
```
@jasdel jasdel force-pushed the feature/RESTJSONGenMarshalers branch from f54b9aa to d080fad Compare September 25, 2017 20:17
@jasdel jasdel merged commit 1a10a10 into aws:master Sep 25, 2017
@jasdel jasdel deleted the feature/RESTJSONGenMarshalers branch September 25, 2017 21:32
@awstools awstools mentioned this pull request Sep 26, 2017
jasdel added a commit to jasdel/aws-sdk-go that referenced this pull request Sep 26, 2017
…aws#1547)"

This reverts commit 1a10a10.

Reverts RESTJSON marshaler improvement due to bug in RESTXML
jasdel added a commit that referenced this pull request Sep 26, 2017
* Revert "API Marshaler: Add generated marshalers for RESTJSON protocol (#1547)"

This reverts commit 1a10a10.

Reverts RESTJSON marshaler improvement due to bug in RESTXML

* Revert "API Marshaling: Add generated marshalers for RESTXML protocol (#1409)"

This reverts commit 37448a9.

Reverts RESTXML due to #1550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants