Zauważałem bardzo powolne ładowanie stron z potokiem aktywów w Rails 3.1. Każdy zasób (css/js/image) zajmuje ładowanie od pół sekundy do sekundy. To naprawdę zaczyna hamować rozwój. Nie mam takich samych problemów w produkcji.Dlaczego potok zasobów spowolnił proces localhost w Railsach 3.1
Czy istnieje rozwiązanie? Plik dziennika poniżej pokazuje, jak każdy indywidualny atutem jest ładowanie w 0,5 - 0,3 sekundy:
# load of page itself...
...
Completed 200 OK in 1231ms (Views: 933.0ms | ActiveRecord: 15.6ms)
Started GET "/assets/blueprint/screen.css?body=1" for 127.0.0.1 at 2012-01-15 15:53:00 +0000
Served asset /blueprint/screen.css - 304 Not Modified (0ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2012-01-15 15:53:00 +0000
Served asset /application.css - 304 Not Modified (0ms)
Started GET "/assets/blueprint/print.css?body=1" for 127.0.0.1 at 2012-01-15 15:53:00 +0000
Served asset /blueprint/print.css - 304 Not Modified (0ms)
Started GET "/assets/universal/application.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:01 +0000
Served asset /universal/application.js - 304 Not Modified (2ms)
Started GET "/assets/universal/animate-color.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:01 +0000
Served asset /universal/animate-color.js - 304 Not Modified (0ms)
Started GET "/assets/universal/animate-shadow.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:02 +0000
Served asset /universal/animate-shadow.js - 304 Not Modified (0ms)
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:02 +0000
Served asset /jquery_ujs.js - 304 Not Modified (0ms)
Started GET "/assets/universal/jquery.placehold.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:02 +0000
Served asset /universal/jquery.placehold.js - 304 Not Modified (0ms)
Started GET "/assets/universal/autoresize.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:03 +0000
Served asset /universal/autoresize.js - 304 Not Modified (0ms)
Started GET "/assets/universal/utilities.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:03 +0000
Served asset /universal/utilities.js - 304 Not Modified (0ms)
Started GET "/assets/universal/validators.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:03 +0000
Served asset /universal/validators.js - 304 Not Modified (0ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-01-15 15:53:04 +0000
Served asset /jquery.js - 304 Not Modified (0ms)
Started GET "/assets/whitelabel/pingpanel/pingpanel.css?body=1" for 127.0.0.1 at 2012-01-15 15:53:04 +0000
Served asset /whitelabel/pingpanel/pingpanel.css - 304 Not Modified (0ms)
Started GET "/assets/logo.png" for 127.0.0.1 at 2012-01-15 15:53:05 +0000
Served asset /logo.png - 304 Not Modified (0ms)
Started GET "/assets/application_bar_background.png" for 127.0.0.1 at 2012-01-15 15:53:05 +0000
Served asset /application_bar_background.png - 304 Not Modified (0ms)
Started GET "/assets/linen-new.jpg" for 127.0.0.1 at 2012-01-15 15:53:06 +0000
Served asset /linen-new.jpg - 304 Not Modified (0ms)
Efekt spowolnienia może być lepiej widoczne w analizatorze chrom sieci:
'rails-dev-tweaks' wykonał świetną robotę, dziękuję. Średni czas wczytywania strony zmniejszył się z 9s do 2.6s. –