Today I would like to compare a activescaffold rails 3.0 controller index action waterfall chart with one of a rails 3.1 controller.
You will see a big difference in these charts because of the asset pipeline feature. Asset pipeline is merging your js and css assets into one big file which improves your webperformance because of reduced http requests.
In addition I m using css data-uri feature for background images. Please note that ie6 and ie7 do not support data-uris.
ActiveScaffold Asset Pipeline Comparison
December 22, 2011
ActiveScaffold, Rails ActiveScaffold, Asset Pipeline 5 Comments


Dec 28, 2011 @ 19:50:44
Hi,
Maybe I misinterpreted your graphs, but for me Rails 3.0 finishes loading after 31.5sec whereas Rails 3.1 needs 60.3sec (although using fewer requests). Where is the performance gain in that?
thanks
Dec 29, 2011 @ 11:09:06
well, I thought that the secs were so incredible high that nobody would assume that this is a graph stating something about the actual time… so forget about the times.. the graphs should only show you that the asset pipeline is reducing the overall request count needed to finish loading the page. In real world scenarios this will improve your webperformance.
Jan 29, 2012 @ 00:25:20
This is really great.
Certainly the no. of requests seems to be less on the no. of JS/CSS files to be downloaded.
When jquery, jquery-ui is loaded via Google CDN, the require active_scaffold is actually reloading all the jquery, jquery-ui libraries once again.
See the code here:
There is an explicit inclusion of the require_assets – though they may have been loaded via CDN loading. Would be good if we can have an option in initializer section where these can be optionally included in the assets.
https://github.com/activescaffold/active_scaffold/blob/master/app/assets/javascripts/active_scaffold.js.erb
ActiveScaffold.config = ;
and here …
https://github.com/activescaffold/active_scaffold/blob/master/app/assets/stylesheets/active_scaffold.css.erb
Jan 30, 2012 @ 10:01:55
I would suggest not to include gem jquery_rails.
Thank you can load jquery from cdn. jquery-rails does not support a cdn.
Jan 29, 2012 @ 00:26:49
Hmm … seems like the code pasted from those files is not shown!!!