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

Improve performance of the URL.origin method #1306

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 17, 2024

Improve performance of origin

@bdraco bdraco marked this pull request as draft October 17, 2024 20:11
@bdraco bdraco force-pushed the origin_performance branch from f4d24b2 to 606d48a Compare October 17, 2024 20:16
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 17, 2024
@bdraco bdraco changed the title Improve performance of origin Improve performance of the URL.origin method Oct 17, 2024
Copy link

codspeed-hq bot commented Oct 17, 2024

CodSpeed Performance Report

Merging #1306 will not alter performance

Comparing origin_performance (9df97bc) with master (2a48724)

Summary

✅ 68 untouched benchmarks

@bdraco
Copy link
Member Author

bdraco commented Oct 17, 2024

Looks like origin benchmark isn't good because its testing the cache

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.92%. Comparing base (2a48724) to head (9df97bc).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1306   +/-   ##
=======================================
  Coverage   95.92%   95.92%           
=======================================
  Files          27       27           
  Lines        5348     5351    +3     
  Branches      322      323    +1     
=======================================
+ Hits         5130     5133    +3     
  Misses        192      192           
  Partials       26       26           
Flag Coverage Δ
CI-GHA 95.92% <100.00%> (+<0.01%) ⬆️
MyPy 44.44% <70.00%> (-0.03%) ⬇️
OS-Linux 99.31% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.36% <100.00%> (+<0.01%) ⬆️
OS-macOS 99.03% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 99.01% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 99.26% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 99.26% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 99.01% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 99.26% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 99.26% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 98.97% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 99.22% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 99.27% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.17 99.29% <100.00%> (+<0.01%) ⬆️
VM-macos-latest 99.03% <100.00%> (+<0.01%) ⬆️
VM-ubuntu-latest 99.31% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.36% <100.00%> (+<0.01%) ⬆️
pytest 99.31% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@bdraco bdraco force-pushed the origin_performance branch from 3985482 to 9df97bc Compare October 17, 2024 21:17
@bdraco
Copy link
Member Author

bdraco commented Oct 17, 2024

The benchmark could still be better because codspeed is re-running it again to avoid jitter which still hits the cache. The actual improvement is better than the 4% its showing. Will need to think about how to improve the benchmark some more, but no reason to wait for a solution as this is clearly faster for all the other cases as well

@bdraco bdraco marked this pull request as ready for review October 17, 2024 21:42
@bdraco bdraco merged commit 36f4a62 into master Oct 17, 2024
43 of 46 checks passed
@bdraco bdraco deleted the origin_performance branch October 17, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant