![rubymine rspec rubymine rspec](https://static.filehorse.com/screenshots/developer-tools/rubymine-screenshot-03.png)
![rubymine rspec rubymine rspec](https://i.ytimg.com/vi/FgGOa7Mxoxg/sddefault.jpg)
That’s probably because vagrant ssh-config takes most of that time to sort things out: % time vagrant ssh-config > /dev/nullĢ,53s user 0,79s system 77% cpu 4,269 total Vagrant ssh is slow to connect % time vagrant ssh -c whoamiĢ,57s user 0,73s system 82% cpu 3,984 total This is especially annoying when running single spec which should be fast. The problem is that every time I start rspec, it takes a few seconds to connect to the box, before actually doing anything. I use RubyMine and Vagrant for my Rails development and run RSpec specs from RubyMine for convenience. (Don’t ask me why JetBrains thinks this is necessary.) Increasing this limit affects, among other things, the Inspections performance too as these are run for all tabs after every spec run. RubyMine has default setting of allowing only a handful of tabs open at the same time. Now, after running specs, RubyMine CPU usage jumps to around 100 % for only a little while and then returns to normal. In my case there were a lot of “Double quotes” as well as whitespace whitespace warnings, but growing tired of not finding any low hanging fruits, I decided to just disable almost all warnings and left only error-level Inspections.
Rubymine rspec trial#
Unfortunately RubyMine does not tell you which Inspection it currently runs, so it is trial and error to find out what causes the slowness. Navigate to Preferences > Editor > Inspections and go through the long list.
Rubymine rspec code#
One support ticket for WebStorm though tipped me off and turned out that the culprit are Inspections – those little yellow or red markers around right gutter that tell you when your code smells or is outright broken. I even tried profiling the app to see if it gives any ideas (hint: it did not). Googling around for solution did not find anything, especially as there are not background processes running. If I do fast iteration on specs, then this high CPU usage is constant and heats up my Mac, causing fan noise and of course drains battery. RubyMine, being an IDE and not light editor, is expected to hog some CPU. But after each RSpec run, the CPU usage jumps to 300 % for several minutes.