0
votes

EDIT: Disregard everything I wrote about assets. I've disabled them and I'm still having this problem. Running on OSX.

I found an answer here that made it sound like it might have to do with assets. Basically I made a virgin app with a form on one page that leads to another and each page TAKES SO SLOW TO LOAD it's driving me crazy.

Here's a snippet from the server log when I make a request:

Started GET "/assets/pages.css?body=1" for 127.0.0.1 at 2012-01-10 22:21:35 -0700 Served asset /pages.css - 304 Not Modified (1ms)

Started GET "/assets/authenticator.js?body=1" for 127.0.0.1 at 2012-01-10 22:21:39 -0700 Served asset /authenticator.js - 304 Not Modified (1ms)

Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-01-10 22:21:39 -0700 Served asset /jquery.js - 304 Not Modified (2ms)

Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2012-01-10 22:21:43 -0700 Served asset /application.js - 200 OK (0ms)

Started GET "/assets/pages.js?body=1" for 127.0.0.1 at 2012-01-10 22:21:43 -0700 Served asset /pages.js - 304 Not Modified (1ms)

The loading times the log suggests are not even close to 1-3 seconds per each request. It is driving me bananas. I installed the plugin as that other answer suggested but I have no idea how to use it or what to write in the settings.

Thanks guys.

1
Hope you are using Rails-3.1.Check this link:-guides.rubyonrails.org/asset_pipeline.htmlShamith c
Windows? Linux? Mac OS X? More info please.Ryan Bigg
OSX. Sorry, forgot to mention.dsp_099
Can you show the rest of the log for the given request? Also, what plugin are you referring to?Michelle Tilley
Suspect this is down to class reloading in dev mode (cache_classes in the config) combined with a non-SSD hard disk. Ruby is pretty bad (read, terrible) when it comes to performance loading files.d11wtq

1 Answers

4
votes

Try to look for this line in your development.log

Completed 200 OK in 476ms (Views: 155.1ms | ActiveRecord: 14.7ms)

The usual culprit is partials and classes not being cached in development. Alternatively, you can also try this gem: https://github.com/wavii/rails-dev-tweaks