Closed
Description
The protocol marshallers make numerous allocations when marshaling and unmarshalling structs. This is much more noticeable for larger API operations such as ElasticTranscoder's CreateJob can does about 90k bytes in 4k allocations. Whereas encoding/json
marshal on the same structure only does 4k bytes in 7 allocations.
#376 updates internal/protocol/json
to perform a more efficient check if a field is exported or not. Reducing the allocations caused by strings.ToLower
. Several of the other protocol's marshallers perform strings.ToLower
check, and probably can be updated also.
Improving the SDK's marshallers to be more efficient with allocations would help to increase performance and reduce memory usage.