jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.97k stars 515 forks source link

Performance issue with maximumLineLength #2246

Closed Arcanemagus closed 8 years ago

Arcanemagus commented 8 years ago

It seems that the maximumLineLength rule is making the CLI interface take 7.7x as long to run on a file, and the Node interface 33x times as long to run.

The configuration used was a copy of the current airbnb.json. The maximumLineLength rule was commented out using /* */ (no difference was found for simply removing it).

Tested with jscs@3.0.3 running through Node.js v5.11.0 on the CLI and through Atom v1.8.0-beta3 for the "Node API" (equivalent to Node v5.1.1).

The file used to test this can be found in here: linter-jscs_GH241-2.zip

The raw data can be found here: https://docs.google.com/spreadsheets/d/1HGXcBMeRCgOEvAuvgNZEgtZUdEAsPwm24BUYtS_x_cI/edit?usp=sharing

This was originally filed as part of https://github.com/AtomLinter/linter-jscs/issues/241.

If you need any additional information please let me know.

markelog commented 8 years ago

Replaced with https://github.com/jscs-dev/node-jscs/issues/2246

Arcanemagus commented 8 years ago

You referenced this issue as the one replacing it... not sure what you meant there :stuck_out_tongue:.

Arcanemagus commented 8 years ago

Ah, probably https://github.com/cst/cst/issues/113, as you referenced this from there.

markelog commented 8 years ago

Oh yeah, sorry, indeed i meant cst/cst#113

epsitec commented 8 years ago

I don't understand how this issue with too many long lines being reported has anything to do with memory consumption. Setting the maximumLineLength to 200 (in my case) made the problem disappear.

The lines verified by JSCS are not very long, so I am surprised that you classified this as a memory issue. Do you need additional source files which exhibit the problem?

markelog commented 8 years ago

Perhaps things get more clear if you would read issue description?