Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

result buffer calculation aligned with typescript solution. 1mb testcase #14

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

thoag-godaddy
Copy link
Contributor

Previously attempts to encrypt larger pieces of data received a -3 error "EncryptToJson: JsonToBuffer: Output buffer needed XXX bytes". This change uses the same method as the typescript version to better estimate response size

@thoag-godaddy
Copy link
Contributor Author

Benchmark before

Benchmarking encrypt/decrypt round trips of "b'mysecretdata'".
Executed 100 iterations in 0.01407377100076701 seconds.
Executed 1000 iterations in 0.13790925899957074 seconds.
Executed 10000 iterations in 1.3697859630001403 seconds.
Executed 100000 iterations in 13.484866296999826 seconds.

And After

Executed 100 iterations in 0.015025922999484465 seconds.
Executed 1000 iterations in 0.13937084400004096 seconds.
Executed 10000 iterations in 1.3681038099994112 seconds.
Executed 100000 iterations in 13.687599488999695 seconds.

Not a significant difference

@jgowdy jgowdy merged commit 5265878 into godaddy:main Feb 29, 2024
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.

3 participants