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

chore: enhance server performance #4632

Merged
merged 2 commits into from
Sep 15, 2023
Merged

Conversation

GiveMe-A-Name
Copy link
Member

@GiveMe-A-Name GiveMe-A-Name commented Sep 13, 2023

Summary

🤖 Generated by Copilot at eb1f918

The pull request improves the performance and memory efficiency of the ModernServer and ModernServerContext classes in the prod-server package. It does this by caching and reusing parsed URL data, and simplifying the request handling logic.

Details

🤖 Generated by Copilot at eb1f918

  • Improve performance and memory usage of ModernServerContext class by caching parsed URL, host, and query objects (link, link, link, link, link)
  • Simplify logic in handleRequest method of ModernServer class by moving route.entryName condition to outer if statements and removing redundant condition (link, link, link)

Related Issue

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

@changeset-bot
Copy link

changeset-bot bot commented Sep 13, 2023

⚠️ No Changeset found

Latest commit: b1e0b30

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@GiveMe-A-Name GiveMe-A-Name changed the title WIP chore: enhance server performance chore: enhance server performance Sep 14, 2023
@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Patch coverage has no change and project coverage change: -4.02% ⚠️

Comparison is base (99693f0) 57.59% compared to head (b1e0b30) 53.58%.
Report is 1153 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4632      +/-   ##
==========================================
- Coverage   57.59%   53.58%   -4.02%     
==========================================
  Files         672      665       -7     
  Lines       17794    18140     +346     
  Branches     3876     4158     +282     
==========================================
- Hits        10249     9720     -529     
- Misses       6934     7761     +827     
- Partials      611      659      +48     

see 468 files with indirect coverage changes

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

@GiveMe-A-Name GiveMe-A-Name merged commit 074f9a3 into main Sep 15, 2023
9 checks passed
@GiveMe-A-Name GiveMe-A-Name deleted the chore/enhance-server-performance branch September 15, 2023 02:57
@chenjiahan chenjiahan mentioned this pull request Sep 28, 2023
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.

2 participants