diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-04 03:42:19 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-04 03:42:19 +0000 |
commit | ebc6120f99ac5665efa4cfb84b5c6c898238c477 (patch) | |
tree | ae528c37c3e255c26eb3f82cccf2052d2a2cda36 /IkiWiki/Render.pm | |
parent | f877845353e5f8cfe6d3bdad625b9c2bacee878e (diff) |
* Work around very innefficient behavior in File::Spec::abs2rel. Result
is a savings of 2 pointless fork/execs per link calculation, which
results in ~25% speedup of ikiwiki building its own doc wiki, and
about 35% speedup displaying RecentChanges!
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r-- | IkiWiki/Render.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 404726930..d88ec93d3 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -4,7 +4,6 @@ package IkiWiki; use warnings; use strict; -use File::Spec; use IkiWiki; use Encode; @@ -48,7 +47,7 @@ sub backlinks ($) { #{{{ foreach my $p (keys %links) { next if bestlink($page, $p) eq $page; if (grep { length $_ && bestlink($p, $_) eq $page } @{$links{$p}}) { - my $href=File::Spec->abs2rel(htmlpage($p), dirname($page)); + my $href=abs2rel(htmlpage($p), dirname($page)); # Trim common dir prefixes from both pages. my $p_trimmed=$p; |