-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up processing of new files in daemon by caching ASTs (#10128)
Processing newly installed stub files, in particular, could be quite slow incrementally in mypy daemon. This is because adding N files results in N steps interally, each of which adds one file. However, each step parses all remaining files, resulting in an O(n**2) algorithm. For example, processing `six` stubs could take about 40s (when not using a compiled mypy). Partially address the issue by caching parsed ASTs during a single increment. This speeds up the `import six` use case by about 3x when not using a compiled mypy. It's still about 3x slower when using daemon, however.
- Loading branch information
Showing
5 changed files
with
58 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters