Skip to content
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

slim-lint slow with RuboCop 1.72 and plugins #193

Open
erikaxel opened this issue Feb 21, 2025 · 0 comments
Open

slim-lint slow with RuboCop 1.72 and plugins #193

erikaxel opened this issue Feb 21, 2025 · 0 comments

Comments

@erikaxel
Copy link

We experienced a dramatic slowdown (approx 10x) using Rubocop 1.72 compared to 1.71 for slim-lint.

With Rubocop 1.71.2:

 time bundle exec slim-lint app/**/*.slim
________________________________________________________
Executed in   33.81 secs    fish           external
   usr time   32.47 secs  587.00 micros   32.47 secs
   sys time    1.22 secs  743.00 micros    1.22 secs

With Rubocop 1.72.2:

time bundle exec slim-lint app/**/*.slim
________________________________________________________
Executed in  359.47 secs    fish           external
   usr time  306.95 secs  525.00 micros  306.95 secs
   sys time   51.91 secs  923.00 micros   51.91 secs

We have not seen a similar slowdown on our Rubocop runs, so this seems to be an issue with slim-lint.

The biggest change between 1.71 and 1.72 is the introduction of the new RuboCop plugin system which I think is the problem.

To support this hypothesis, tested the following

  • Removed all plugins under the new plugin: keyword: 14 seconds
  • Adding one plugin: 70 seconds
  • Adding three plugins: 360 seconds

The plugins were adding using the new keyword like so:

plugins:
  - rubocop-rspec
  - rubocop-rails
  - rubocop-performance

This only seems to be a problem when using plugin because we have some plugins included using the old require: method which didn't seem to have any effect on the run time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant