1. Logilab
  2. Untitled project
  3. pylint
  4. Pull requests

Pull requests

#170 Merged
Repository
carlio
Branch
default
Repository
logilab
Branch
default

Extremely long lines cause effective hangs when searching for notes

Author
  1. carlio
Reviewers
Description

With extraordinarily long lines, the notes checker (in checkers/misc.py, looking for TODO/XXX etc) will take a huge amount of time to find notes. As an example, see https://pypi.python.org/pypi/SeriesMarker/ which has one line of over 200,000 characters: https://github.com/toroettg/SeriesMarker/blob/develop/seriesmarker/gui/resources/serieswatcher_rc.py#L13 .

On this particular code base, pylint took over 5 minutes before I killed it.

This is due to the regular expression used. By replacing this with a more simple in check before resorting to using the regular expression, the problem goes away, and is probably more efficient in general (as almost no lines will have a "note" in it).

(See also https://github.com/landscapeio/prospector/issues/36)

Comments (0)