8000 refactor(Scalar.AspNetCore): improve GZip check by xC0dex · Pull Request #5669 · scalar/scalar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor(Scalar.AspNetCore): improve GZip check #5669

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

Merged
merged 4 commits into from
May 16, 2025

Conversation

xC0dex
Copy link
Collaborator
@xC0dex xC0dex commented May 16, 2025

The performance and complexity of the GZIP check can be simplified. This PR removes some code and improves the performance. I also added dedicated tests for this.

Benchmark:

Method Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
Current 115.61 ns 2.017 ns 1.887 ns 1.00 0.02 - NA
New 15.13 ns 0.148 ns 0.124 ns 0.13 0.00 - NA

Checklist

I’ve gone through the following:

  • I’ve added an explanation why this change is needed.
  • I’ve added a changeset (pnpm changeset).
  • I’ve added tests for the regression or new feature.

@xC0dex xC0dex requested review from marclave and hanspagel as code owners May 16, 2025 14:22
Copy link
changeset-bot bot commented May 16, 2025

🦋 Changeset detected

Latest commit: a042547

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@scalar/aspnetcore Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
relativeci bot commented May 16, 2025

#9852 Bundle Size — 2.46MiB (0%).

a042547(current) vs 3113a01 main#9851(baseline)

Warning

Bundle contains 6 duplicate packages – View duplicate packages

Bundle metrics  no changes
                 Current
#9852
     Baseline
#9851
No change  Initial JS 2.46MiB 2.46MiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 1 1
No change  Assets 1 1
No change  Modules 1489 1489
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 172 172
No change  Duplicate Packages 6 6
Bundle size by type  no changes
                 Current
#9852
     Baseline
#9851
No change  JS 2.46MiB 2.46MiB

Bundle analysis reportBranch refactor/aspnetcore-gzip-perform...Project dashboard


Generated by RelativeCIDocumentationReport issue

Copy link
Contributor
github-actions bot commented May 16, 2025

@xC0dex xC0dex force-pushed the refactor/aspnetcore-gzip-performance branch from ba5aa4d to 1b4c7b5 Compare May 16, 2025 16:01
Copy link
Member
@amritk amritk left a comment

Choose a reason for hiding this comment

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

gainz!

@xC0dex xC0dex force-pushed the refactor/aspnetcore-gzip-performance branch from 1b4c7b5 to a042547 Compare May 16, 2025 18:01
@marclave marclave merged commit 0ed0415 into main May 16, 2025
33 checks passed
@marclave marclave deleted the refactor/aspnetcore-gzip-performance branch May 16, 2025 20:14
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
0