Skip to content

Conversation

@b-long
Copy link
Owner

@b-long b-long commented Dec 23, 2024

Remove slow function

Explanation of removed function:

If the input is of type EncryptionConfig, it creates a new DecryptionConfig by copying the
relevant fields from the EncryptionConfig. We do this using a type switch 1, which might
be improved using a type assertion 2.

It also calls the inputValidation function, which converts the struct to a map using JSON
marshaling and unmarshaling, then iterates through the map to check for empty values.

Depending on client configuration / usage, we've observed ~7% performance improvement (without other changes) and ~13% performance improvement when massaging some of the calling code

@b-long b-long force-pushed the feature/perf-improvements branch from 2207a35 to 6b2a2fe Compare December 23, 2024 18:25
@b-long b-long merged commit bcd4ec3 into develop Dec 23, 2024
8 checks passed
@b-long b-long deleted the feature/perf-improvements branch December 23, 2024 20:33
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