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(headers): if the guard is immutable (forEach) #2427

Closed
wants to merge 2 commits into from

Conversation

tsctx
Copy link
Member

@tsctx tsctx commented Nov 12, 2023

This relates to...

Rationale

See #2424

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@tsctx
Copy link
Member Author

tsctx commented Nov 12, 2023

cc @KhafraDev

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2023

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (e39a632) 85.54% compared to head (51be95b) 85.77%.
Report is 88 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2427      +/-   ##
==========================================
+ Coverage   85.54%   85.77%   +0.22%     
==========================================
  Files          76       76              
  Lines        6858     6925      +67     
==========================================
+ Hits         5867     5940      +73     
+ Misses        991      985       -6     
Files Coverage Δ
index-fetch.js 100.00% <100.00%> (ø)
lib/api/api-stream.js 100.00% <100.00%> (ø)
lib/core/connect.js 81.25% <100.00%> (ø)
lib/fetch/body.js 97.68% <100.00%> (ø)
lib/fetch/constants.js 97.22% <100.00%> (+0.67%) ⬆️
lib/fetch/file.js 95.45% <100.00%> (+0.05%) ⬆️
lib/fetch/global.js 100.00% <ø> (ø)
lib/fetch/response.js 97.04% <100.00%> (+1.20%) ⬆️
lib/fetch/util.js 86.53% <100.00%> (+0.71%) ⬆️
lib/fetch/webidl.js 94.50% <100.00%> (-0.03%) ⬇️
... and 10 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

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

iterating over this uses headers' entries which should already be optimized for immutable headers?

@tsctx
Copy link
Member Author

tsctx commented Nov 12, 2023

@KhafraDev
This method has little overhead. But it is unnecessary since most people use iterators. This PR is closed.

@tsctx tsctx closed this Nov 12, 2023
@tsctx tsctx deleted the perf/headers-guard-immutable-foreach branch November 12, 2023 21:22
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.

None yet

4 participants