-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
autocorrect hangs for fetchers.rb in Ruby cassandra driver #2735
Comments
RC's autocorrect is incredibly slow in some cases. I am working on speeding it up. Let's see how it works for you after that. |
Well, just to be clear, the autocorrect was working through several of my files and then it got stuck on fetchers.rb for many minutes. To narrow things down, I reverted client.rb (which is about 900+ lines of code) and ran rubocop on just that file with auto-correct, and it finished in about 15 seconds. Do the same with fetchers.rb (which is about 1100+ lines), and it sits for minutes before I abort it. So I don't think this is just a performance issue. Now, fetchers.rb is a fairly complex file, so it may be slower because of that, but orders of magnitude slower sounds very suspicious. |
When I run auto-correction on that file I get the following error after about 90 seconds:
I can try to find the cause of the problem soon. |
I've narrowed it down to def f
X.map do |(a,
b)|
end
end It also causes an infinite auto-correction loop. |
It looks like |
I've got a fix. |
I don't have time to write specs right now, but I'll push first. |
CPU is pegged, so I suspect a tight loop. Clone the ruby-driver repo (https://github.com/datastax/ruby-driver.git) and try this and you should see the same behavior. NOTE: without auto-correct, rubocop does terminate.
The text was updated successfully, but these errors were encountered: