Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to cache astroid AST between runs? #2292

Closed
rueberger opened this issue Jul 15, 2018 · 2 comments
Closed

Possible to cache astroid AST between runs? #2292

rueberger opened this issue Jul 15, 2018 · 2 comments
Labels
Duplicate 🐫 Duplicate of an already existing issue performance

Comments

@rueberger
Copy link

rueberger commented Jul 15, 2018

I'm not sure if this at all technically feasible, but pylint is currently the slowest part of our test suite, takes almost a minute for a modest size project with parallelization enabled.

I presume that the most expensive part of running pylint is computing the AST, and am wondering if it is possible to reuse it.

I apologize if this is obviously infeasible, I have no idea how astroid works.

@PCManticore
Copy link
Contributor

Hey, thanks for creating an issue!

Computing an AST is actually one of the most trivial part in pylint's run, it's not that significant. What instead is slow is the inference, that is the actual process of solving the types of values in your program when pylint is looking for its patterns.

In pylint 2.0 though we should be a little bit faster, although were not where we'd like to be just yet:

What would be useful in your case is to run a profiler against pylint, yappi or something else, and with those results we might check what exactly is affecting the performance for your code base.

@Pierre-Sassoulas
Copy link
Member

Closing as duplicate of #1416

@Pierre-Sassoulas Pierre-Sassoulas added the Duplicate 🐫 Duplicate of an already existing issue label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate 🐫 Duplicate of an already existing issue performance
Projects
None yet
Development

No branches or pull requests

3 participants