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

Small cleanups to making children paths #1304

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Small cleanups to making children paths #1304

merged 2 commits into from
Oct 17, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 17, 2024

What do these changes do?

This function was a bit hard to unpack so I have added some comments about what is going on.

Since we reconstruct nearly everything, create a new tuple instead of replacing

This function was a bit hard to unpack so I have added
some comments about what is going on.

Since we reconstruct nearly everything, create a new tuple
instead of replacing
Copy link

codspeed-hq bot commented Oct 17, 2024

CodSpeed Performance Report

Merging #1304 will improve performances by 50.85%

Comparing make_child (2664612) with master (fa83191)

Summary

⚡ 1 improvements
✅ 64 untouched benchmarks

Benchmarks breakdown

Benchmark master make_child Change
test_url_joinpath_encoded 1,313.9 µs 871 µs +50.85%

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.37%. Comparing base (fa83191) to head (2664612).
Report is 146 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1304      +/-   ##
==========================================
+ Coverage   95.90%   99.37%   +3.47%     
==========================================
  Files          27       19       -8     
  Lines        5323     4345     -978     
  Branches      320      270      -50     
==========================================
- Hits         5105     4318     -787     
+ Misses        192       22     -170     
+ Partials       26        5      -21     
Flag Coverage Δ
CI-GHA 99.30% <100.00%> (+3.40%) ⬆️
MyPy ?
OS-Linux 99.30% <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.96% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 99.21% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 99.26% <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.30% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.36% <100.00%> (+<0.01%) ⬆️
pytest 99.30% <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
Copy link
Member Author

bdraco commented Oct 17, 2024

Didn't expect it to speed up that much. Should do join as well

@bdraco
Copy link
Member Author

bdraco commented Oct 17, 2024

I couldn't believe ._replace was so expensive, but it is

@bdraco
Copy link
Member Author

bdraco commented Oct 17, 2024

origin, join, extend_query and with_path are probably good candidates to rework to avoid _replace. The others are likely not called enough that they are worth optimizing

@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 marked this pull request as ready for review October 17, 2024 20:16
@bdraco bdraco merged commit 780de98 into master Oct 17, 2024
44 of 46 checks passed
@bdraco bdraco deleted the make_child branch October 17, 2024 20:17
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