Hello, I added caching for my welcome-page, and i get 31reqs/sec. Is it good enough? How i can speedup page loading? Thanks Processing WelcomeController#index (for 127.0.0.1 at 2007-09-28 16:47:25) [GET] Session ID: 4876ef61ab99cffa85412e617daf1ba5 Parameters: {"action"=>"index", "controller"=>"welcome", "locale"=>"uk"} Rendering within layouts/base Rendering welcome/index Rendered //_actions (0.00000) Rendered //_agenstva (0.00000) Rendered welcome/_index (0.00000) Rendered //_langbar (0.01600) Rendered //_tologin (0.00000) Rendered //_header (0.00000) Rendered //_topmenuicons (0.00000) Rendered //_topmenu (0.00000) Rendered //_leftmenu (0.01600) Rendered //_footer (0.00000) Cached page: /uk/welcome.html (0.00000) Completed in 0.03200 (31 reqs/sec) | Rendering: 0.03200 (100%) | DB: 0.00000 (0%) | 200 OK [http://localhost/] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 28 Sep 2007, at 14:50, Igor K. wrote:> > Hello, > > I added caching for my welcome-page, and i get 31reqs/sec. Is it good > enough? How i can speedup page loading?This is a rather imprecise question: good enough for what? If you are running in development mode, you''ll probably get different numbers when you run in production mode (and quite probably running more than one mongrel) Fred> > Thanks > > Processing WelcomeController#index (for 127.0.0.1 at 2007-09-28 > 16:47:25) [GET] > Session ID: 4876ef61ab99cffa85412e617daf1ba5 > Parameters: {"action"=>"index", "controller"=>"welcome", > "locale"=>"uk"} > Rendering within layouts/base > Rendering welcome/index > Rendered //_actions (0.00000) > Rendered //_agenstva (0.00000) > Rendered welcome/_index (0.00000) > Rendered //_langbar (0.01600) > Rendered //_tologin (0.00000) > Rendered //_header (0.00000) > Rendered //_topmenuicons (0.00000) > Rendered //_topmenu (0.00000) > Rendered //_leftmenu (0.01600) > Rendered //_footer (0.00000) > Cached page: /uk/welcome.html (0.00000) > Completed in 0.03200 (31 reqs/sec) | Rendering: 0.03200 (100%) | DB: > 0.00000 (0%) | 200 OK [http://localhost/] > -- > Posted via http://www.ruby-forum.com/. > > --~--~---------~--~----~------------~-------~--~----~ > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk- > unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > For more options, visit this group at http://groups.google.com/ > group/rubyonrails-talk?hl=en > -~----------~----~----~----~------~----~------~--~--- >
On 28 Sep 2007, at 14:50, Igor K. wrote:> I added caching for my welcome-page, and i get 31reqs/sec. Is it good > enough? How i can speedup page loading? > > Thanks > > Processing WelcomeController#index (for 127.0.0.1 at 2007-09-28 > 16:47:25) [GET] > Session ID: 4876ef61ab99cffa85412e617daf1ba5 > Parameters: {"action"=>"index", "controller"=>"welcome", > "locale"=>"uk"} > Rendering within layouts/base > Rendering welcome/index > Rendered //_actions (0.00000) > Rendered //_agenstva (0.00000) > Rendered welcome/_index (0.00000) > Rendered //_langbar (0.01600) > Rendered //_tologin (0.00000) > Rendered //_header (0.00000) > Rendered //_topmenuicons (0.00000) > Rendered //_topmenu (0.00000) > Rendered //_leftmenu (0.01600) > Rendered //_footer (0.00000) > Cached page: /uk/welcome.html (0.00000) > Completed in 0.03200 (31 reqs/sec) | Rendering: 0.03200 (100%) | DB: > 0.00000 (0%) | 200 OK [http://localhost/]If you''re getting output like this it means that page isn''t being loaded from the cache. Page caching works by generating an HTML file from your output so future requests won''t touch rails and will be handled entirely at the web server level. By default, caching isn''t active in development mode so you won''t see any effect from it unless switching to production mode. Once you have page caching working, improving performance works just the same as for any HTML page: reduce the number of images, javascript files, css files, etc, tune up your server, and things like that. James. -- James Stewart Play: http://james.anthropiccollective.org Work: http://jystewart.net/process/ --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for reply Please check is am i right doing caching? When i use caches_page i got a html file, for example welcome.html. Now i''m trying to cache my partials this way: <td> <% cache "lang" do %> <%= render :partial => ''/langbar'' %> <% end %> <% cache "tologin" do %> <%= render :partial => ''/tologin'' %> <% end %> <% cache "header" do %> <%= render :partial => ''/header'' %> <% end %> </td> After this in folder tmp/cache i got a lang,tologin,header.CACHE files and i get 62 reqs/sec and for some pages - 10000 reqs/ses. This is my log Processing OfficeController#index (for 127.0.0.1 at 2007-09-28 17:13:00) [GET] Session ID: 741a5f94493e0a7171c7e97d900ceb25 Parameters: {"action"=>"index", "controller"=>"buy/office", "locale"=>"uk"} Rendering within layouts/base Rendering buy/office/index Fragment read: lang (0.00000) Fragment read: footer (0.00000) Completed in 0.01600 (62 reqs/sec) | Rendering: 0.01600 (100%) | DB: 0.00000 (0%) | 200 OK [http://localhost/uk/buy/office] Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---