From 75cdc7460f789569d0997a9812ca1985b3676b86 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Mon, 14 Mar 2011 16:57:23 +1300 Subject: [PATCH] Improved performance in menu rendering when there are very many pages by first querying the translations table and then using those results in the pages table rather than the other way around. There are still too many queries in the logfile for my liking so this has a way to come. --- core/app/views/shared/_menu.html.erb | 3 +-- core/app/views/shared/_menu_branch.html.erb | 6 +++++- core/lib/refinery/application_controller.rb | 2 +- pages/app/models/page.rb | 12 ++++++------ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/core/app/views/shared/_menu.html.erb b/core/app/views/shared/_menu.html.erb index 1dd3be81bc..cd96007f3e 100644 --- a/core/app/views/shared/_menu.html.erb +++ b/core/app/views/shared/_menu.html.erb @@ -11,7 +11,6 @@ selected_item = collection.detect{|page| selected_page?(page)} selected_item = @page if selected_item.nil? end - sibling_count = roots.length - 1 -%>