Skip to content

Conversation

@lucix-aws
Copy link
Contributor

see comment in the source

this drops another 25M allocations when interceptors aren't in use (which will be mostly everyone since the feature is new)

@lucix-aws lucix-aws requested review from a team as code owners November 11, 2025 13:05
@lucix-aws
Copy link
Contributor Author

relates aws/aws-sdk-go-v2#3197

len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 &&
len(opts.Interceptors.BeforeRetryLoop) == 0 &&
len(opts.Interceptors.BeforeAttempt) == 0 &&
len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very small nit on ordering, but this seems like it should go after all the BeforeX, or we could put them in the order they are added below on errors.Join

return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{
Interceptors: opts.Interceptors.AfterDeserialization,
}, "OperationDeserializer", middleware.Before)
return errors.Join(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: This is probably even better since you can see all the errors related to adding interceptors

@lucix-aws lucix-aws merged commit ddbac1c into main Nov 11, 2025
15 checks passed
@lucix-aws lucix-aws deleted the sliminterceptors branch November 11, 2025 17:20
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