Ruby on Rails Wednesday, August 31, 2011

Consider yourself lucky, I had to deal with 5 mins on first load recently. Take a  look at the rails-dev-tweaks gem, it helps a lot. In addition to that make sure that you don't autoload all the models if you use mongoid.



On Wed, Aug 31, 2011 at 11:21 AM, Josh <josh.m.sharpe@gmail.com> wrote:
I understand the difference between dev and prod.

The issue here is that in 3.0, a dev page load took half a second or
less.  It now takes upwards of 5 seconds.

On Aug 31, 2:15 pm, Dieter Lunn <coder2...@gmail.com> wrote:
> In development it recompiles with every reload. In production it only
> compiles when the files change and serves up the cached version
> otherwise.
>
> Dieter Lunnhttp://ubiety.ca
>
>
>
>
>
>
>
> On Wed, Aug 31, 2011 at 1:12 PM, Josh <josh.m.sha...@gmail.com> wrote:
> > With the release of 3.1, it seems that things have drastically changed
> > in the development workflow.
>
> > With the asset pipeline enabled, and the likes of this in my layouts:
>
> > = stylesheet_link_tag 'application', :debug => Rails.env.development?
> > = javascript_include_tag 'application', :debug =>
> > Rails.env.development?
>
> > ...every single css, js and image gets re-compiled on every single
> > request.  This takes forever.
>
> > My dev log is mostly comprised of this:
>
> > Started GET "/assets/jquery-ui-1.8.16.custom.css?body=1" for 127.0.0.1
> > at 2011-08-31 14:04:04 -0400
> > Served asset /jquery-ui-1.8.16.custom.css - 304 Not Modified (0ms)
>
> > It seems to me that the dev rails server (both webrick, and
> > passenger), is handling the request of every asset.  It didn't work
> > this way in 3.0.x. While it clearly says 304 (0ms) I can attest that
> > the overall time to process a page (and all its assets) is
> > *significantly* longer.
>
> > Here's my application.rb and development.rb - they're basically the
> > 3.1 defaults.
>
> >http://stackoverflow.com/questions/7248911/rails-3-1-force-developmen...
>
> > So is there a solution here?  Even if I didn't have :debug => true in
> > my javascript/stylesheet tag, the JS and CSS files would still have to
> > be complied/generated as well as every image - which is still a
> > significant regression.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> > To post to this group, send email to rubyonrails-talk@googlegroups.com.
> > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment