inline: if using pagenames, don't add a dependency on "page1 or page2 or..."

This is unnecessary and just slows us down (by a factor of 2, in the
pessimal case where every page has an inline with pagenames); it's also
not possible to optimize it into add_depends_exact calls.
master
Simon McVittie 2009-08-27 23:30:41 +01:00
parent 8b927d4a65
commit d92f767fb7
1 changed files with 2 additions and 3 deletions

View File

@ -195,10 +195,10 @@ sub preprocess_inline (@) {
@list = map { bestlink($params{page}, $_) } @list = map { bestlink($params{page}, $_) }
split ' ', $params{pagenames}; split ' ', $params{pagenames};
$params{pages} = join(" or ", @list);
} }
else { else {
add_depends($params{page}, $params{pages});
@list = pagespec_match_list( @list = pagespec_match_list(
[ grep { $_ ne $params{page} } keys %pagesources ], [ grep { $_ ne $params{page} } keys %pagesources ],
$params{pages}, location => $params{page}); $params{pages}, location => $params{page});
@ -247,7 +247,6 @@ sub preprocess_inline (@) {
@list=@list[0..$params{show} - 1]; @list=@list[0..$params{show} - 1];
} }
add_depends($params{page}, $params{pages});
# 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.