Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Mar 25, 2025

Add new heuristics to detect various potential performance issues when using -a foo.html.
The issues include various generic (non-specialized) operations, uses of functools and
itertools, and slow isinstance checks that use runtime-checkable protocols.

Implement a mypy AST visitor that is used to detect some issues that would be harder to detect
when analyzing the generated IR.

Support annotation priorities so that if multiple annotations are generated for a line, only the
highest-priority ones are shown. This is a bit crude but useful, since often multiple heuristics
are triggered by some inefficient code, and duplicate annotations would be verbose and
sometimes confusing.

@JukkaL JukkaL merged commit b1be379 into master Mar 26, 2025
12 checks passed
@JukkaL JukkaL deleted the mypyc-annotate branch March 26, 2025 16:56
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.

3 participants