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

Reuse RuboCop::CLI #198

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Reuse RuboCop::CLI #198

merged 1 commit into from
Mar 6, 2025

Conversation

koic
Copy link
Contributor

@koic koic commented Mar 6, 2025

RuboCop::CLI is generated only once using initialize, instead of creating a new instance for each file. This eliminates redundant processes related to RuboCop::CLI, improving performance.

Fixes #193.

Verified

This commit was signed with the committer’s verified signature.
spencerschrock Spencer Schrock
`RuboCop::CLI` is generated only once using memoization, instead of creating a new instance for each file.
This eliminates redundant processes related to `RuboCop::CLI`, improving performance.

Fixes sds#193.
@koic koic force-pushed the reuse_rubocop_cli branch from 8cf44ff to 6ae30d4 Compare March 6, 2025 15:56
@viralpraxis
Copy link

I can confirm that it works fine now. Thank you @koic!

@sds sds added the bug label Mar 6, 2025
@sds sds merged commit cc35faa into sds:main Mar 6, 2025
4 checks passed
@sds
Copy link
Owner

sds commented Mar 6, 2025

Thank you. Released in 0.32.2

@koic koic deleted the reuse_rubocop_cli branch March 6, 2025 22:39
@erikaxel
Copy link

erikaxel commented Mar 7, 2025

Wow, this is a great standalone improvement as well. Even without the new plugin system our time to lint went from 30s to 13s, so 2x. Thanks!

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

Successfully merging this pull request may close these issues.

slim-lint slow with RuboCop 1.72 and plugins
4 participants