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

perf(lambda-at-edge): do not decompress content from fetch in externa… #871

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

dphang
Copy link
Collaborator

@dphang dphang commented Jan 9, 2021

…l rewrite.

  • Since we aren't doing anything with the response body any, there's no need to decompress it. Send it back to CF response as buffer and do not decompress it.
  • If already compressed, it will reuse the existing compression (e.g brotli or gzip) whereas before it would decompress + then rely on CF to re-compress it
  • If not already compressed, it will be same behavior and CF will auto-compress specific content types (e.g json, html, txt)

This should help with performance and I believe should help size issues like: #870 (as long as content can be compressed)

@codecov
Copy link

codecov bot commented Jan 9, 2021

Codecov Report

Merging #871 (b682adf) into master (42c9276) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #871      +/-   ##
==========================================
- Coverage   80.50%   80.49%   -0.01%     
==========================================
  Files          63       63              
  Lines        2257     2256       -1     
  Branches      513      513              
==========================================
- Hits         1817     1816       -1     
  Misses        378      378              
  Partials       62       62              
Impacted Files Coverage Δ
...ckages/libs/lambda-at-edge/src/routing/rewriter.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42c9276...b682adf. Read the comment docs.

@dphang dphang merged commit f0a9b86 into master Jan 10, 2021
@delete-merged-branch delete-merged-branch bot deleted the dphang/external-rewrite-no-decompress branch January 10, 2021 00:15
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