Skip to content

Performance degradation between version 2.7.2 and 2.7.4? #4353

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

Closed
tyralla opened this issue Apr 14, 2021 · 6 comments
Closed

Performance degradation between version 2.7.2 and 2.7.4? #4353

tyralla opened this issue Apr 14, 2021 · 6 comments
Assignees

Comments

@tyralla
Copy link

tyralla commented Apr 14, 2021

I know there other issues dealing with the performance of Pylint 2.7.0 and generics, but this problem seems a little different to me.

20 days ago, Pylint evaluated my project (which uses generics) on Travis-CI in the usual amount of time (806 seconds). This is what Travis installed then:

Successfully installed astroid-2.5.1 isort-5.8.0 lazy-object-proxy-1.6.0 mccabe-0.6.1 pylint-2.7.2 wrapt-1.12.1

Now, Pylint cannot finish within any reasonable time limit. This is from the latest log file:

Successfully installed astroid-2.5.3 isort-5.8.0 lazy-object-proxy-1.6.0 mccabe-0.6.1 pylint-2.7.4 wrapt-1.12.1

On my local computer, both version 2.7.2 and 2.7.4 and also some older versions I tried are way too slow (I manually stopped the process after more than an hour; I cannot remember this happened ever before). Note that Travis-CI uses Python 3.6, and I use Python 3.8 on my local computer.

@Pierre-Sassoulas
Copy link
Member

Thank you for opening the issue. Do you use generic classes ? (#4079)

@tyralla
Copy link
Author

tyralla commented Apr 14, 2021

Yes, I do. But as I mentioned, performance was okay 20 days ago, while issue #4079 is a little older.

@tyralla
Copy link
Author

tyralla commented Apr 19, 2021

I made some test and, at least for Python 3.6, there seems to be an issue with astroid.

As mentioned above, with this combination of packages Pylint runs (almost) forever:

Successfully installed astroid-2.5.3 isort-5.8.0 lazy-object-proxy-1.6.0 mccabe-0.6.1 pylint-2.7.4 wrapt-1.12.1

For this combination, its the same:

Successfully installed astroid-2.5.3 isort-5.8.0 lazy-object-proxy-1.6.0 mccabe-0.6.1 pylint-2.7.2 wrapt-1.12.1

However, going back to astroid 2.5.1 restores the original performance:

Successfully installed astroid-2.5.1 isort-5.8.0 lazy-object-proxy-1.6.0 mccabe-0.6.1 pylint-2.7.2 wrapt-1.12.1

I am almost sure the problem arises when Pylints analyses a chain of generic classes in my codebase. Possibly due to "Fix mro for classes that inherit from typing.Generic*" of astroid 2.5.3?

@hippo91
Copy link
Contributor

hippo91 commented May 13, 2021

@tyralla thanks for your report and investigation!

@hippo91 hippo91 self-assigned this May 13, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue May 21, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 2, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 8, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 8, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 8, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 10, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 11, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 11, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 25, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 25, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jun 25, 2021
@hippo91
Copy link
Contributor

hippo91 commented Jul 10, 2021

@tyralla are you facing the same problem with latest versions of astroid and pylint?
If so, is it possible to have access to the sources you are linting?

@tyralla
Copy link
Author

tyralla commented Jul 27, 2021

@hippo91: Sorry for the late response. Pylint now finishes within a reasonable time limit again on my local computer (Pylint 2.9.5, Astroid 2.6.5, Python 3.8.5, Windows). Unfortunately, I cannot check it on Travis-CI (Python 3.6) anymore - no more free open source support.

Thank you very much for your effort!

@tyralla tyralla closed this as completed Jul 27, 2021
tyralla added a commit to hydpy-dev/hydpy that referenced this issue Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants