summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/link.pm
AgeCommit message (Collapse)Author
2009-05-06Avoid %links accumulating duplicates. (For TOVA)Joey Hess
This is sorta an optimisation, and sorta a bug fix. In one test case I have available, it can speed a page build up from 3 minutes to 3 seconds. The root of the problem is that $links{$page} contains arrays of links, rather than hashes of links. And when a link is found, it is just pushed onto the array, without checking for dups. Now, the array is emptied before scanning a page, so there should not be a lot of opportunity for lots of duplicate links to pile up in it. But, in some cases, they can, and if there are hundreds of duplicate links in the array, then scanning it for matching links, as match_link and some other code does, becomes much more expensive than it needs to be. Perhaps the real right fix would be to change the data structure to a hash. But, the list of links is never accessed like that, you always want to iterate through it. I also looked at deduping the list in saveindex, but that does a lot of unnecessary work, and doesn't completly solve the problem. So, finally, I decided to add an add_link function that handles deduping, and make ikiwiki-transition remove the old dup links.
2008-12-23finalise version 3.00 of the plugin apiJoey Hess
2008-12-17Coding style change: Remove explcit vim folding markers.Joey Hess
2008-09-27Export pagetitle, titlepage, linkpage.Joey Hess
2008-08-03add plugin safe/rebuild info (part 1 of 2)Joey Hess
too many plugins.. brain exploding..
2008-07-24fix encoding issues with link conversionJoey Hess
Have to convert link text to page name going in. And on the way out, need to replace spaces with underscores in the link text, which is not normally done with titles.
2008-07-23test suite and partial fix for encoding issues in link renamingJoey Hess
2008-07-23preserve case of subpageJoey Hess
2008-07-23case preservationJoey Hess
2008-07-23add renamepage hooksJoey Hess
Implemented for regular wikilinks, with a test suite.
2008-02-11* Add the linkify and scan hooks. These hooks can be used to implementJoey Hess
custom, first-class types of wikilinks. * Move standard wikilink implementation to a new wikilink plugin, which will of course be enabled by default.