calendar, inline, map: don't pre-join dependencies

The new dependency handling works better (eliminates more duplicates) if
dependencies are split up. On the same wiki mentioned in the previous
commit, this saves about a second (i.e. 4%) on the same test.
master
Simon McVittie 2009-06-18 15:55:55 +01:00
parent fe4f176f72
commit b6fcb1cb0e
3 changed files with 9 additions and 3 deletions

View File

@ -212,7 +212,9 @@ EOF
add_depends($params{page}, $params{pages});
# Explicitly add all currently linked pages as dependencies, so
# that if they are removed, the calendar will be sure to be updated.
add_depends($params{page}, join(" or ", @list));
foreach my $p (@list) {
add_depends($params{page}, $p);
}
return $calendar;
}

View File

@ -251,7 +251,9 @@ sub preprocess_inline (@) {
# Explicitly add all currently displayed pages as dependencies, so
# that if they are removed or otherwise changed, the inline will be
# sure to be updated.
add_depends($params{page}, join(" or ", $#list >= $#feedlist ? @list : @feedlist));
foreach my $p ($#list >= $#feedlist ? @list : @feedlist) {
add_depends($params{page}, $p);
}
if ($feeds && exists $params{feedpages}) {
@feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page});

View File

@ -73,7 +73,9 @@ sub preprocess (@) {
add_depends($params{page}, $params{pages});
# Explicitly add all currently shown pages, to detect when pages
# are removed.
add_depends($params{page}, join(" or ", keys %mapitems));
foreach my $item (keys %mapitems) {
add_depends($params{page}, $item);
}
# Create the map.
my $parent="";