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

DNM: Experiment to speed up creating cookie morsels #9594

Closed
wants to merge 7 commits into from
Closed

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 29, 2024

This likely needs to be optimized upstream but we can get an idea if its worth it here

Copy link

codspeed-hq bot commented Oct 29, 2024

CodSpeed Performance Report

Merging #9594 will improve performances by 12.91%

Comparing fast_morsel (8de6833) with master (7d0f980)

Summary

⚡ 1 improvements
✅ 6 untouched benchmarks

Benchmarks breakdown

Benchmark master fast_morsel Change
test_load_cookies_into_temp_cookiejar 210.4 µs 186.4 µs +12.91%

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.62%. Comparing base (e23e036) to head (8de6833).
Report is 3 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9594   +/-   ##
=======================================
  Coverage   98.62%   98.62%           
=======================================
  Files         113      113           
  Lines       35284    35305   +21     
  Branches     4187     4189    +2     
=======================================
+ Hits        34799    34820   +21     
  Misses        325      325           
  Partials      160      160           
Flag Coverage Δ
CI-GHA 98.51% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.18% <100.00%> (+<0.01%) ⬆️
OS-Windows 96.08% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.40% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 97.26% <100.00%> (+0.01%) ⬆️
Py-3.10.15 97.66% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.72% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 95.70% <100.00%> (-1.64%) ⬇️
Py-3.12.7 98.19% <100.00%> (-0.03%) ⬇️
Py-3.13.0 98.20% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 97.16% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 97.57% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 97.18% <100.00%> (-0.01%) ⬇️
VM-macos 97.40% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 98.18% <100.00%> (+<0.01%) ⬆️
VM-windows 96.08% <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 30, 2024

It's a really simple optimization. The loop can be replaced with a dict update upstream.

aiohttp/cookiejar.py Outdated Show resolved Hide resolved
@bdraco bdraco closed this Oct 31, 2024
@bdraco bdraco deleted the fast_morsel branch November 2, 2024 16:30
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.

1 participant