Hi, I've been using HAML for a while now in a new app and am loving
it.
However, I've just updated to edge rails and noticed that pages are
taking an age to render. Updating HAML to edge didn't seem to change
anything.
Here's the relevant output from rendering a page of the app whilst in
production mode:
Rendering template within layouts/application
Rendering channels/show
Rendered /articles/_article_preview (6.87600)
Rendered /common/_page_includes (6.84500)
Rendered /common/_user_menu (0.01600)
Rendered /common/_header (0.01600)
Rendered /common/sidebar/_not_logged_in (0.01500)
Rendered /common/sidebar/_sidebar (0.01500)
Rendered /common/_flash_messages (0.01600)
Rendered /common/_footer (0.10900)
Completed in 14.04900 (0 reqs/sec) | Rendering: 13.90800 (98%) | DB:
0.01600 (0%) | 200 OK
As you can see, 2 partials are taking the best part of 7 seconds to
render, which can't be right. Especially as there's nothing complex
going on in those partials.
_page_includes.haml is simply the following:
= javascript_include_tag 'prototype'
= javascript_include_tag 'builder'
= javascript_include_tag 'effects'
= javascript_include_tag 'dragdrop'
= javascript_include_tag 'controls'
= javascript_include_tag 'application'
= stylesheet_link_tag 'common'
= stylesheet_link_tag 'layout'
= stylesheet_link_tag 'sidebar'
= stylesheet_link_tag 'application'
and _article_preview.haml is:
- url = @channel ? channel_article_path(@channel, article_preview) :
article_path(article_preview)
%div{:id => dom_id(article_preview), :class =>
dom_class(article_preview) +' '+ read_class(article_preview)}
%h4= link_to white_list(article_preview.title), url
- if logged_in?
- if article_preview.starred_by? current_user
%p= link_to 'unstar', unstar_item_path(article_preview), :method
=> :put
- else
%p= link_to 'star', star_item_path(article_preview), :method
=> :put
Any pointers in where to look to help debug this performance issue
would be greatly appreciated.
I'm running windows XP with ruby 1.8.5.
Thanks in advance.
--
Richard Livsey
Head of Agile Development, CitySafe
http://citysafe.org
http://livsey.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---