Skip to content

Re-introduce GC freeze hack into parallel checking#21302

Merged
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:gc-i-am-the-danger
Apr 24, 2026
Merged

Re-introduce GC freeze hack into parallel checking#21302
ilevkivskyi merged 1 commit intopython:masterfrom
ilevkivskyi:gc-i-am-the-danger

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

This gives around 4-5% speed improvement on self-check while I don't see any visible change in memory use. I also process implementations one by one, this should allow freeing some memory a bit earlier, while I don't think this will have any effect on cache writing performance.

@JukkaL could you please run this on Dropbox code bases, while checking the memory use as well (preferably on both Mac and Linux)?

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL
Copy link
Copy Markdown
Collaborator

JukkaL commented Apr 23, 2026

I can try this out tomorrow.

@JukkaL
Copy link
Copy Markdown
Collaborator

JukkaL commented Apr 24, 2026

This was maybe ~3% faster on 3.12 (macOS) when type checking the big internal codebase, with roughly flat memory usage. 3.14.0 was a bit faster still, but I don't have a baseline to compare to. Performance and memory on Linux (3.12) was also fine. This looks solid to me.

@ilevkivskyi ilevkivskyi merged commit 643c2ac into python:master Apr 24, 2026
24 checks passed
@ilevkivskyi ilevkivskyi deleted the gc-i-am-the-danger branch April 24, 2026 10:11
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.

2 participants