pylint icon indicating copy to clipboard operation
pylint copied to clipboard

``duplicate-code`` takes over an hour for a large project even when disabled, if ``reports=yes``

Open Alphadelta14 opened this issue 4 years ago • 5 comments

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

  1. Find some project with 500000 lines
  2. Run pylint
  3. 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

Alphadelta14 avatar Mar 11 '20 22:03 Alphadelta14