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
parent
fe4f176f72
commit
b6fcb1cb0e
|
@ -212,7 +212,9 @@ EOF
|
||||||
add_depends($params{page}, $params{pages});
|
add_depends($params{page}, $params{pages});
|
||||||
# Explicitly add all currently linked pages as dependencies, so
|
# Explicitly add all currently linked pages as dependencies, so
|
||||||
# that if they are removed, the calendar will be sure to be updated.
|
# 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;
|
return $calendar;
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,7 +251,9 @@ sub preprocess_inline (@) {
|
||||||
# Explicitly add all currently displayed pages as dependencies, so
|
# Explicitly add all currently displayed pages as dependencies, so
|
||||||
# that if they are removed or otherwise changed, the inline will be
|
# that if they are removed or otherwise changed, the inline will be
|
||||||
# sure to be updated.
|
# 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}) {
|
if ($feeds && exists $params{feedpages}) {
|
||||||
@feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page});
|
@feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page});
|
||||||
|
|
|
@ -73,7 +73,9 @@ sub preprocess (@) {
|
||||||
add_depends($params{page}, $params{pages});
|
add_depends($params{page}, $params{pages});
|
||||||
# Explicitly add all currently shown pages, to detect when pages
|
# Explicitly add all currently shown pages, to detect when pages
|
||||||
# are removed.
|
# are removed.
|
||||||
add_depends($params{page}, join(" or ", keys %mapitems));
|
foreach my $item (keys %mapitems) {
|
||||||
|
add_depends($params{page}, $item);
|
||||||
|
}
|
||||||
|
|
||||||
# Create the map.
|
# Create the map.
|
||||||
my $parent="";
|
my $parent="";
|
||||||
|
|
Loading…
Reference in New Issue