From 2fbfcd16e6d5717fea7b23d7fa82961222a6e32f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Oct 2009 15:46:23 -0400 Subject: [PATCH] map: Use a contentless dependency unless show= is specified. This makes simple maps efficient enough that they can be used on sidebars! --- IkiWiki/Plugin/map.pm | 8 ++++---- debian/changelog | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 54146dc46..682960777 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -68,13 +68,13 @@ sub preprocess (@) { } # Needs to update whenever a page is added or removed (or in some - # cases, when its content changes, if show=title), so register a - # dependency. - add_depends($params{page}, $params{pages}); + # cases, when its content changes, if show= is specified), so + # register a dependency. + add_depends($params{page}, $params{pages}, content => exists $params{show}); # Explicitly add all currently shown pages, to detect when pages # are removed. foreach my $item (keys %mapitems) { - add_depends($params{page}, $item); + add_depends($params{page}, $item, content => exists $params{show}); } # Create the map. diff --git a/debian/changelog b/debian/changelog index bec1a61d3..ae39d4847 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low * pagecount: Use a contentless dependency, which makes this directive much less expensive to use, since page edits will no longer trigger an unnecessary update of the page count. + * map: Use a contentless dependency unless show= is specified. + This makes simple maps efficient enough that they can be used on sidebars! -- Joey Hess Sun, 27 Sep 2009 17:40:03 -0400 -- 2.44.0