Skip to content

Protocol (un)marshallers make many allocations #377

Closed
@jasdel

Description

@jasdel

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions