Skip to content

Improve performance for errors on class with many attributes#14379

Merged
hauntsaninja merged 4 commits intopython:masterfrom
hauntsaninja:match-perf
Jan 3, 2023
Merged

Improve performance for errors on class with many attributes#14379
hauntsaninja merged 4 commits intopython:masterfrom
hauntsaninja:match-perf

Conversation

@hauntsaninja
Copy link
Copy Markdown
Collaborator

@hauntsaninja hauntsaninja commented Jan 3, 2023

When checking manticore with --check-untyped-defs, this is a 4x total speedup from master, from ~320s to ~80s (uncompiled).

I looked into this because of python/typeshed#9443 (comment)

When checking manticore with `--check-untyped-defs`, this is a 4x total
speedup from master, from ~320s to ~80s.

I looked into this because of python/typeshed#9443 (comment)
@hauntsaninja
Copy link
Copy Markdown
Collaborator Author

cc @AlexWaygood

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 3, 2023

Diff from mypy_primer, showing the effect of this PR on open source code:

sublime_debugger (https://github.com/daveleroy/sublime_debugger)
- modules/views/breakpoints_panel.py:72: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable)  [attr-defined]
+ modules/views/breakpoints_panel.py:72: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable)  [attr-defined]

discord.py (https://github.com/Rapptz/discord.py)
- discord/app_commands/models.py:198: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable)  [attr-defined]
+ discord/app_commands/models.py:198: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable)  [attr-defined]
- discord/app_commands/models.py:867: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable)  [attr-defined]
+ discord/app_commands/models.py:867: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable)  [attr-defined]
- discord/app_commands/models.py:868: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable)  [attr-defined]
+ discord/app_commands/models.py:868: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable)  [attr-defined]
- discord/app_commands/models.py:966: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable)  [attr-defined]
+ discord/app_commands/models.py:966: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable)  [attr-defined]
- discord/channel.py:2970: error: "object" has no attribute "__iter__"; maybe "__str__" or "__dir__"? (not iterable)  [attr-defined]
+ discord/channel.py:2970: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable)  [attr-defined]

streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/elements/exception_test.py:87:13: error: Module has no attribute "format"; maybe "form"?  [attr-defined]
+ lib/tests/streamlit/elements/exception_test.py:87:13: error: Module has no attribute "format"  [attr-defined]

@hauntsaninja hauntsaninja merged commit f104914 into python:master Jan 3, 2023
@hauntsaninja hauntsaninja deleted the match-perf branch January 3, 2023 07:47
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.

1 participant