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

EmptyLinesAroundAttributeAccessor and SpaceAroundMethodCallOperator are incredibly slow #8348

Closed
JelteF opened this issue Jul 15, 2020 · 1 comment

Comments

@JelteF
Copy link

JelteF commented Jul 15, 2020

Expected behavior

Running rubocop should only become slightly slower when enabling Layout/EmptyLinesAroundAttributeAccessor and Layout/SpaceAroundMethodCallOperator.

Actual behavior

When running rubocop on a 2500 line xxx_spec.rb file runtime of rubocop goes from ~3.5 seconds to ~22.5 seconds.

Steps to reproduce the problem

Add this to your .rubocop.yml:

Layout/EmptyLinesAroundAttributeAccessor:
  Enabled: true
Layout/SpaceAroundMethodCallOperator:
  Enabled: true

Run it on some big xxx_spec.rb file and see that the runtime is now much higher.

RuboCop version

Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:

$ [bundle exec] rubocop -V
0.87.1 (using Parser 2.7.1.4, rubocop-ast 0.1.0, running on ruby 2.6.6 x86_64-linux)
@marcandre
Copy link
Contributor

Indeed. You'll be glad to hear that it is fixed, see #8021 and released in 0.88.0

We're also working on making other cops faster (and by we I mean mostly @fatkodima 😅 💪 )

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

2 participants