Closed thedarkone closed 10 years ago
@obromios: can you try running this in debug mode?
There is built-in debug mode in rails-dev-boost that can be enabled by putting this line a Rails initializer file:
RailsDevelopmentBoost.debug! if defined?(RailsDevelopmentBoost)
After restarting your server rails-dev-boost
will start to spewing detailed tracing information about its actions into your development.log
file.
The correctly running rails-dev-boost
in debug mode should look like something like this:
[DEV-BOOST] [LOAD]
and [DEV-BOOST] [ADD_CONSTANTS]
messages as the application is booting or server is processing the first request for the given controller/page,[DEV-BOOST] [CHANGED]
and gradually indented [DEV-BOOST] [REMOVING]
messages if an .rb
has been changed and related constants are being unloaded, followed by [DEV-BOOST] [LOAD]
and [DEV-BOOST] [ADD_CONSTANTS]
on the next request,[DEV-BOOST]
messages if no .rb
files have been changed (except maybe an occasional [DEV-BOOST] --- START ---
and [DEV-BOOST] --- END ---
if rails-dev-boost
is not running in an async mode).Can you see if there is something obviously wrong with the way rails-dev-boost
works for your app? If not can you mail me the debug log output to: thedarkone2 [] gmail?
Hi
I have made a small amount of progress on this. I found that if I set config.assets.debug = false in config/development.rb, then my load times goes down to about 24 seconds (although without the gem, the load time is now 8 seconds).
Hey @obromios,
I tried looking into this, running an app with your Gemfile
- I get no slowdowns :(.
Looks like I'm not going to be able to make any progress unless you can provide a reproducible app :(. It is quite obvious this has something to do with assets generation, but I'm stuck as I have nothing to poke at...
thanks.
Thank you for trying.
What would I need to do to create a reproducible app?
Chris
Date: Fri, 24 May 2013 08:30:41 -0700 From: notifications@github.com To: rails-dev-boost@noreply.github.com CC: obromios@gmail.com Subject: Re: [rails-dev-boost] Slow down no. 2 (#43)
Hey @obromios,
I tried looking into this, running an app with your Gemfile - I get no slowdowns :(.
Looks like I'm not going to be able to make any progress unless you can provide a reproducible app :(. It is quite obvious this has something to do with assets generation, but I'm stuck as I have nothing to poke at...
thanks.
— Reply to this email directly or view it on GitHub.
I tried running a Rails 3.2 app with your Gemfile, but that wasn't enough to trigger the described problem. Also I just added gems from your Gemfile, I wasn't using them.
What I need is a Rails application that has this problem (slow assets requests with rails-dev-boost enabled). This means that you have to somehow isolate the code in your application that is causing this behavior. Unfortunately, I don't think there is an easy way to do that...
Maybe you can create a copy of your app and then disable some parts of it (for example delete all but 1 controller, or all but 1 model etc), until the slowdown goes away... then you would know, what is causing the problem and could provide a sample Rails app, that I could work with. Alternatively you could try a git bisect
strategy, you git clone
your app and then try checking out a version that is 1 year old (or 2 year old) add a rails-dev-boost
and see the slow downs, then you try to narrow down to the commit that introduced the problem. "git bisecting" it like that also sucks, since you have to worry about migrations, manually adding and bundle installing rails-dev-boost
each time, start a server, poke at the app :(.
You could also try manually loading a single asset file (.js or .css I presume, you can use firebug or chrome dev tools to find out which of the assets are loading the slowest) to see if it is always slow, if it is, you can then start a server with Ruby profiling enabled and try to analyze the profile you get, to see where it spends all that time (this way you find out which Gem or library is responsible).
Hi,
Well, the good news is that somehow I seem to have fixed my very slow development server problem. I did a rebuild of my system and I installed rack-mini-profiler, and one of these actions seem to have sped up things by about a factor of 10.
The bad news is that rails-dev-boost, still makes things worse, in fact a lot worse. I have attached two web pages (with supporting files) which are outputs of miniprofiler with and without the rails-dev-boost gem. According to mini-profiler, without takes 2.7s and with takes 5.4s, but in fact the difference is a lot worse. The load time with the rails-dev-boost gem is longer than 10 seconds. Anyway, I hope these traces help you to identify what is going wrong. I prefer that you do not put them on public display, I am a bit paranoid about revealing internal details of my app.
regards
Chris
Date: Wed, 5 Jun 2013 03:55:23 -0700 From: notifications@github.com To: rails-dev-boost@noreply.github.com CC: obromios@gmail.com Subject: Re: [rails-dev-boost] Slow down no. 2 (#43)
I tried running a Rails 3.2 app with your Gemfile, but that wasn't enough to trigger the described problem. Also I just added gems from your Gemfile, I wasn't using them.
What I need is a Rails application that has this problem (slow assets requests with rails-dev-boost enabled). This means that you have to somehow isolate the code in your application that is causing this behavior. Unfortunately, I don't think there is an easy way to do that...
Maybe you can create a copy of your app and then disable some parts of it (for example delete all but 1 controller, or all but 1 model etc), until the slowdown goes away... then you would know, what is causing the problem and could provide a sample Rails app, that I could work with. Alternatively you could try a git bisect strategy, you git clone your app and then try checking out a version that is 1 year old (or 2 year old) add a rails-dev-boost and see the slow downs, then you try to narrow down to the commit that introduced the problem. "git bisecting" it like that also sucks, since you have to worry about migrations, manually adding and bundle installing rails-dev-boost each time, start a server, poke at the app :(.
You could also try manually loading a single asset file (.js or .css I presume, you can use firebug or chrome dev tools to find out which of the assets are loading the slowest) to see if it is always slow, if it is, you can then start a server with Ruby profiling enabled and try to analyze the profile you get, to see where it spends all that time (this way you find out which Gem or library is responsible).
— Reply to this email directly or view it on GitHub.
@obromios reports this in other ticket:
A typical page load goes from 15 seconds to 90 seconds when I installed this gem. I am running rails 3.2.12, and installed a few minutes ago with
gem 'rails-dev-boost', :git => 'git://github.com/thedarkone/rails-dev-boost.git'
This gem sounds a great idea, so am looking forward to getting it working. Any ideas?