-
Notifications
You must be signed in to change notification settings - Fork 45
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
Cobweb gem causes Rails app to run 10x slower #44
Comments
Whatever it was, I seem to have fixed it by deleting the Gem and reinstalling it. Deleted it using JosephL's advice here: http://stackoverflow.com/questions/12188833/how-to-reinstall-a-gem-using-bundler |
I take it back. This is still an issue. When the gem is properly reinstalled the web server speed drops from 2s to 50s. Same if you force Webrick. Same if you use heroku local. I don't know what the gem is doing on initialization - I can't figure out why this should happen. But it does. |
Another datapoint. If you add the gems that cobweb depends on to the main application Gemfile, there's no problem. It's only when cobweb itself is added. |
Thanks Simon, Cant think off hand what it could be, i'll take a look later and see if i find anything, on a train just now. Stewart. |
had a quick look on the phone, first a couple questions... is it always the same amount of time delay? there are a couple monkey patch bits of code that should be considered. Also do you have a gemfile you are using (and lock) that i can plug into a test rails app, oh and version of rails too. There is a require that loads all rb files that are in the same or sub folders from lib/cobweb.rb, if its missbehaving, could be related. thanks, |
Thanks, after a bit of wrestling with recent el capitan update, i've been able to get rails installed and can replicate this locally with the rubygems gem. I'm going to now try to replicate with local copy and see what its up to. |
Ok, think i've found it, try version 1.0.29. |
Evil, Evil, Evil monkey patching on the String class with method_missing.... Glad its working now. thanks, |
Great gem, thanks a lot for the fix! |
Hi,
I have a very bare-bones Rails App, and when I add
to the Gemfile, run 'bundle' and restart, then all web requests take around 15s to execute instead of 1s. The weird thing is that I haven't even started calling Cobweb code at all.
There are no errors and MiniProfiler tells me that no time is begin spent in SQL. It's just much slower.
Any idea on where to start looking? Is the Gem initialising somehow, even if I'm not explicitly calling it?
Using Webrick and PostGres. Ruby 2.2.3 and Rails 4.2.4.
Thanks!
Simon
The text was updated successfully, but these errors were encountered: