castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
424 stars 25 forks source link

solargraph with VSCode and Ruby 2.5.1 uses all CPU and Memory #52

Closed januszm closed 6 years ago

januszm commented 6 years ago

Platform: Mac OS X 10.11 El Capitan

$ top # or htop
...ruby-2.5.1@content/bin/solargraph

# 98% CPU , takes all memory

It makes it pretty much unusable with Ruby 2.5.1 . I noticed that it still works fine with Rails projects and Ruby versions up-to 2.4.3

castwide commented 6 years ago

Issues with Solargraph and Ruby 2.5 are being tracked at castwide/solargraph#55.

castwide commented 6 years ago

Gem version 0.21.1 is published with fixes for Ruby 2.5.1.

There was a minor bug where the socket transport would attempt to send a response to a message that wasn't prepared for it. Most versions of Ruby silently ignore it, but 2.5.1 raises an ArgumentError. It's been fixed for all Ruby versions.

There's still an issue testing with 2.5.1 on Travis CI, but that appears to be specific to the Travis environment. Tests succeed for me locally using 2.5.1 on Windows and CentOS. I'll keep working on Travis, but in the meantime 2.5.1 should "unofficially" work.

castwide commented 6 years ago

CPU and memory bloat in Ruby 2.5.1 should be resolved. If anyone still has problems, please open a new issue.