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

Backport selector performance improvements from cpython #229

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Jul 22, 2023

Backported PRs

there were a few more improvements that happened by others as a result of the discussion from those PRs but I only included the ones I've been running on my production that made a significant difference.

@bdraco
Copy link
Member Author

bdraco commented Jul 22, 2023

Verified they apply cleanly (I wanted to double check in advance since this generates a lot of CI jobs)

bdraco@MacBook-Pro-9 cpython % git checkout v3.11.4
Note: switching to 'v3.11.4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at d2340ef257 Python 3.11.4
bdraco@MacBook-Pro-9 cpython % git checkout -b am_test
Switched to a new branch 'am_test'
bdraco@MacBook-Pro-9 cpython % git am ~/docker-base/python/3.11/gh*.patch
Applying: gh-106527: asyncio: optimize to add/remove readers and writers (#106528)
Applying: gh-106554: replace `_BaseSelectorImpl._key_from_fd` with `dict.get` (#106555)
Applying: gh-106664: selectors: add get() method to _SelectorMapping (#106665)
Applying: gh-106751: selectors: optimize EpollSelector.select() (#106754)

@bdraco bdraco marked this pull request as ready for review July 22, 2023 21:29
@bdraco
Copy link
Member Author

bdraco commented Jul 22, 2023

There are two patches that are failing but have been for a while that can probably be removed (no idea if they are fixed or not though), but not for this PR

#8 34.64 patching file Modules/_sha3/sha3module.c
#8 34.65 Hunk #1 FAILED at 64.
#8 34.65 1 out of 1 hunk FAILED -- saving rejects to file Modules/_sha3/sha3module.c.rej
#8 34.71 patching file Modules/posixmodule.c
#8 34.73 Hunk #1 FAILED at 234.
#8 34.73 1 out of 1 hunk FAILED -- saving rejects to file Modules/posixmodule.c.rej

@frenck frenck merged commit 74e6b1d into home-assistant:master Jul 23, 2023
94 checks passed
@bdraco
Copy link
Member Author

bdraco commented Jul 23, 2023

thanks

@bdraco bdraco deleted the selector_backports branch July 23, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants