Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API Marshaling: Add generated marshalers for RESTXML protocol (#1409)
This change is the start of an iterative set of changes that will replace the SDK's current reflection base protocol marshalers with generated code for each API type. This works starts with the RESTXML protocol's encoders. The following benchmarks show a significant improvement of execution speed and reduced memory usage. Benchmarks of RESTXML build and full request lifecycle between master and this change. `Build` benchmarks focus on just the marshaling of the request's input parameters. `Request` benchmarks provide a view of the impact of the changes in context to a full request lifecycle. Does not include network latency, nor umarshaling of a response object. ``` go test -tags bench -run NONE -bench ".*" -benchmem ./private/protocol/restxml ``` ``` benchmark old ns/op new ns/op delta BenchmarkRESTXMLBuild_Complex_CFCreateDistro-8 264834 59891 -77.39% BenchmarkRESTXMLBuild_Simple_CFDeleteDistro-8 9666 5894 -39.02% BenchmarkRESTXMLBuild_REST_S3HeadObject-8 19723 7340 -62.78% BenchmarkRESTXMLBuild_XML_S3PutObjectAcl-8 44739 15656 -65.01% BenchmarkRESTXMLRequest_Complex_CFCreateDistro-8 586238 292755 -50.06% BenchmarkRESTXMLRequest_Simple_CFDeleteDistro-8 168954 158484 -6.20% BenchmarkRESTXMLRequest_REST_S3HeadObject-8 228720 199964 -12.57% BenchmarkRESTXMLRequest_XML_S3PutObjectAcl-8 253821 206911 -18.48% benchmark old allocs new allocs delta BenchmarkRESTXMLBuild_Complex_CFCreateDistro-8 1332 478 -64.11% BenchmarkRESTXMLBuild_Simple_CFDeleteDistro-8 63 44 -30.16% BenchmarkRESTXMLBuild_REST_S3HeadObject-8 134 57 -57.46% BenchmarkRESTXMLBuild_XML_S3PutObjectAcl-8 247 113 -54.25% BenchmarkRESTXMLRequest_Complex_CFCreateDistro-8 1641 786 -52.10% BenchmarkRESTXMLRequest_Simple_CFDeleteDistro-8 230 211 -8.26% BenchmarkRESTXMLRequest_REST_S3HeadObject-8 443 366 -17.38% BenchmarkRESTXMLRequest_XML_S3PutObjectAcl-8 466 331 -28.97% benchmark old bytes new bytes delta BenchmarkRESTXMLBuild_Complex_CFCreateDistro-8 87893 27936 -68.22% BenchmarkRESTXMLBuild_Simple_CFDeleteDistro-8 8104 7880 -2.76% BenchmarkRESTXMLBuild_REST_S3HeadObject-8 9544 8800 -7.80% BenchmarkRESTXMLBuild_XML_S3PutObjectAcl-8 17701 11704 -33.88% BenchmarkRESTXMLRequest_Complex_CFCreateDistro-8 141892 80852 -43.02% BenchmarkRESTXMLRequest_Simple_CFDeleteDistro-8 52773 52543 -0.44% BenchmarkRESTXMLRequest_REST_S3HeadObject-8 61947 61193 -1.22% BenchmarkRESTXMLRequest_XML_S3PutObjectAcl-8 70800 64671 -8.66% ```
- Loading branch information