-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Improve performance of handling ports in the URL #1081
Conversation
There were a few places were the port got parsed out of the underlying SplitResult object multiple times. Make sure they are all cached to avoid doing the same work over and over.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1081 +/- ##
=======================================
Coverage 93.01% 93.02%
=======================================
Files 31 31
Lines 4411 4414 +3
Branches 374 376 +2
=======================================
+ Hits 4103 4106 +3
Misses 282 282
Partials 26 26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The line is covered that |
What do these changes do?
There were a few places were the port got parsed out of the underlying
SplitResult
object multiple times. Make sure they are all cached to avoid doing the same work over and over.This solves a minor performance regression that was introduced with the port normalization in #1033
Are there changes in behavior for the user?
performance improvement
Related issue number
#1033
For reference,
is_default_port
fromupdate_headers
inaiohttp
is showing significantly higher on the profile with recent yarl versions.before
after