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

Only construct the allowed_methods set once for a StaticResource #9911

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Nov 15, 2024

noticed in #9899 (comment)

Likely to have minimal performance improvement besides saving some memory churn so I didn't call it in out the changelog

@bdraco bdraco added bot:chronographer:skip This PR does not need to include a change note backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot labels Nov 15, 2024
aiohttp/web_urldispatcher.py Outdated Show resolved Hide resolved
@bdraco bdraco changed the title Only construct the allowed_methods set once for a StaticResource Only construct the allowed_methods set once for a StaticResource Nov 15, 2024
Copy link

codspeed-hq bot commented Nov 15, 2024

CodSpeed Performance Report

Merging #9911 will not alter performance

Comparing set_once_static_resolve (12565d4) with master (2249f2d)

Summary

✅ 26 untouched benchmarks

@bdraco bdraco merged commit 4441d3c into master Nov 15, 2024
39 of 40 checks passed
@bdraco bdraco deleted the set_once_static_resolve branch November 15, 2024 15:57
Copy link
Contributor

patchback bot commented Nov 15, 2024

Backport to 3.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.11/4441d3c84b7cc03e1ab566faf8b6c9de4fa3c0ff/pr-9911

Backported as #9912

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link
Contributor

patchback bot commented Nov 15, 2024

Backport to 3.12: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.12/4441d3c84b7cc03e1ab566faf8b6c9de4fa3c0ff/pr-9911

Backported as #9913

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Nov 15, 2024
bdraco added a commit that referenced this pull request Nov 15, 2024
…s` `set` once for a `StaticResource` (#9912)

Co-authored-by: J. Nick Koston <[email protected]>
bdraco added a commit that referenced this pull request Nov 15, 2024
…s` `set` once for a `StaticResource` (#9913)

Co-authored-by: J. Nick Koston <[email protected]>
@bdraco
Copy link
Member Author

bdraco commented Nov 19, 2024

Going to have to revert this since aiohttp-cors accesses the protected self._routes 😢

https://github.com/aio-libs/aiohttp-cors/blob/38c6c17bffc805e46baccd7be1b4fd8c69d95dc3/aiohttp_cors/urldispatcher_router_adapter.py#L187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant