Skip to content

chore: faster mypy, fix merge error - #1156

Merged
gaborbernat merged 1 commit into
pypa:mainfrom
henryiii:henryiii/chore/fastermypy
Aug 13, 2026
Merged

gaborbernat merged 1 commit into
pypa:mainfrom
henryiii:henryiii/chore/fastermypy

Conversation

@henryiii

@henryiii henryiii commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Changelog

None needed.

  • Added changelog fragment: docs/changelog/<pr_number>.<type>.rst
    • Types: feature, bugfix, doc, removal, misc
    • Example: 123.feature.rst containing Add custom backend support - by :user:`yourname`

Checklist

  • Tests pass locally (tox)
  • Code follows project style (tox -e fix)
  • Type checks pass (tox -e type)
  • Documentation builds (tox -e docs)

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@gaborbernat
gaborbernat enabled auto-merge (squash) August 13, 2026 04:32
@henryiii

Copy link
Copy Markdown
Contributor Author

And here's the speed comparison:

🤖 AI text below 🤖

--no-incremental, 5 interleaved pairs, direct .venv/bin/mypy:

mean
--no-native-parser 1.27 s
--native-parser 0.91 s

That is within noise of the cold-cache numbers (1.24 s → 0.88 s), which makes sense: a deleted cache and a disabled cache both force a full parse of your sources and typeshed. --no-incremental still writes a cache dir afterwards, so the only real difference between the two setups is that one run reads nothing either way.

Summary across all three cache states, native vs not:

  • No cache / cold cache: 1.25 s → 0.89 s (~29 % faster)
  • Warm cache: 0.10 s, parser irrelevant

@gaborbernat
gaborbernat merged commit 8a6bc86 into pypa:main Aug 13, 2026
107 of 111 checks passed
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