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

Rubocop significantly slower on Rails 7.1 #1260

Closed
lukasfroehlich1 opened this issue Mar 26, 2024 · 0 comments
Closed

Rubocop significantly slower on Rails 7.1 #1260

lukasfroehlich1 opened this issue Mar 26, 2024 · 0 comments

Comments

@lukasfroehlich1
Copy link
Contributor

After upgrading to Rails 7.1 we observed a significant slowdown in RuboCop.


Expected behavior

When running RuboCop on Rails 7.0.8.1 it takes 52s.

Actual behavior

When running RuboCop on Rails 7.1.0 it takes 3m 52s.

Steps to reproduce the problem

Update Gemfile to use Rails 7.1:

gem "rails", "~> 7.1.0"

Run RuboCop after deleting cache:

rm -rf ~/.cache/rubocop_cache
bundle exec rubocop -P --enable-pending-cops

Notice that it's much slower.

RuboCop version

 bundle exec rubocop -V                                                                                                           
1.56.3 (using Parser 3.2.2.3, rubocop-ast 1.30.0, running on ruby 3.1.4) [arm64-darwin22]
  - rubocop-capybara 2.18.0
  - rubocop-factory_bot 2.23.1
  - rubocop-inflector 0.2.1
  - rubocop-rails 2.23.1
  - rubocop-rspec 2.24.0
@koic koic closed this as completed in 9ef6d1e Mar 27, 2024
koic added a commit that referenced this issue Mar 27, 2024
[Fix #1260] Fix performance regression caused by `Rails/UnknownEnv` on rails 7.1
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