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

reduce overhead of expressions etag check #1344

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

brharrington
Copy link
Contributor

Before it would compute the etag by computing a sha1 hash
of a string representation of the sorted expression list.
With 100k+ expressions that is quite expensive both in
terms of the memory use and CPU.

This change introduces a cache for the encoded entity so
it can be returned directly if there are frequent calls
within a short period. The ETag is computed over the
encoded and compressed response using CRC32. This reduces
the memory and CPU overhead considerably.

Before it would compute the etag by computing a sha1 hash
of a string representation of the sorted expression list.
With 100k+ expressions that is quite expensive both in
terms of the memory use and CPU.

This change introduces a cache for the encoded entity so
it can be returned directly if there are frequent calls
within a short period. The ETag is computed over the
encoded and compressed response using CRC32. This reduces
the memory and CPU overhead considerably.
@brharrington brharrington added this to the 1.7.0 milestone Sep 21, 2021
@brharrington brharrington merged commit 034df25 into Netflix:master Sep 21, 2021
@brharrington brharrington deleted the lwc-etag branch September 21, 2021 13:55
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.

1 participant