]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
calendar, inline, map: don't pre-join dependencies
authorsmcv@ <smcv@>
Thu, 18 Jun 2009 14:55:55 +0000 (15:55 +0100)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sat, 25 Jul 2009 19:53:49 +0000 (20:53 +0100)
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.

IkiWiki/Plugin/calendar.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/map.pm

index fe4b16072131eea5571a86d75c65a7a117bb3efc..60ef020ccf408a9db9f5361c76846c1991ff481d 100644 (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;
 }
index 9d5ebc34daaeb6aa942f41b1424ece4ba00c9036..6f63b15870e267c30826496e28227ec6b3c2c402 100644 (file)
@@ -234,7 +234,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=grep { pagespec_match($_, $params{feedpages}, location => $params{page}) } @feedlist;
index 120451b5dbde60a26ae165e391cf56232cc30111..e932932f3ba0eeefe99b379189aa3ba870675647 100644 (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="";