pylint
pylint copied to clipboard
``duplicate-code`` takes over an hour for a large project even when disabled, if ``reports=yes``
In a directory with 500000 LOC of python files, we noticed pylint would hang for the entire directory. After investigating, it actually was just taking forever (60+ minutes) to compute similarities. We have similarities disabled for our project, and it was doing this regardless. After removing pylint/checkers/similarities.py, it took about 3 minutes to do all of the checks we wanted.
Steps to reproduce
- Find some project with 500000 lines
- Run pylint
- Wait an hour
Current behavior
It takes an hour to run similarities on a project, despite similarities being disabled.
Expected behavior
Similarities are not checked and do not consume so much time. Or they take a non-noticeable amount of time.
pylint --version output
$ pylint --version
Starting at 18:07:52
pylint3 2.3.1
astroid 2.2.5
Python 3.7.3 (default, Aug 8 2019, 00:00:00)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
(datarobot-6.0) Completed at 18:07:53