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
Create documentation for performance analysis on pylint #4067
Comments
Hello, which one of the pylint's internal are taking a long time ? Could you give the result of your profiler ? There is no direct way to know how long each part of the analysis take as far as I know. If you use a lot of custom exception, a fix done in astroid some time ago but not yet released might be of help, see pylint-dev/astroid#847. |
Unfortunately, using And here's the profiler output:
|
I've managed to localize my particular problem: #4079 However it took a lot of turning parts of code on and off until the root cause was identified. So the problem in general still stands. |
Thanks a lot for the analysis, much appreciated. Regarding performance analysis there is #3013 where I was using the same thing than you |
In my company we have a number of Python projects, and on one of them (220 KB, 4200 lines of code)
pylint
is tremendously slow to run, it takes about 30 minutes on a 4-core machine. The other projects are of comparable size, functionality and complexity, and yetpylint
runs reasonably fast on them. All the projects are "clean" meaning the code is working fine and all pylint errors and warnings have been cleaned up.My purpose here is to identify the aspects of my code that cause
pylint
too long to process, and modify my code so that the problem would go away. I tried different things, like excluding some imports, splitting files and classes in half, etc., but the root of the problem still eludes me. Profiler also is not of much help as it just shows that time gets consumed in somepylint
internals.What I'm looking for is some ideas what to check or how to identify the problem. Maybe there are some internal mechanisms in
pylint
that could be used to find out which parts of the code beings checked are taking a lot of time to check?Thanks!
The text was updated successfully, but these errors were encountered: