2a7721febd
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. |
||
---|---|---|
Bundle | ||
IkiWiki | ||
cpan | ||
debian | ||
doc | ||
plugins | ||
po | ||
t | ||
templates | ||
underlays | ||
.gitignore | ||
.perlcriticrc | ||
CHANGELOG | ||
IkiWiki.pm | ||
Makefile.PL | ||
NEWS | ||
README | ||
auto-blog.setup | ||
auto.setup | ||
docwiki.setup | ||
gitremotes | ||
ikiwiki-makerepo | ||
ikiwiki-mass-rebuild | ||
ikiwiki-transition | ||
ikiwiki-update-wikilist | ||
ikiwiki-w3m.cgi | ||
ikiwiki.in | ||
mdwn2man | ||
pm_filter | ||
wikilist |
README
Use ./Makefile.PL to generate a Makefile, "make" will build the documentation wiki and a man page, and "make install" will install ikiwiki. All other documentation is in the ikiwiki documentation wiki, which is also available online at <http://ikiwiki.info/> A few special variables you can set while using the Makefile: PROFILE=1 turns on profiling for the build of the doc wiki. (Uses Devel::Profile) NOTAINT=0 turns on the taint flag in the ikiwiki program. (Not recommended unless your perl is less buggy than mine -- see http://bugs.debian.org/411786) There are also other variables supported by MakeMaker, including PREFIX, INSTALL_BASE, and DESTDIR. See ExtUtils::MakeMaker(3). In particular, INSTALL_BASE is very useful if you want to install ikiwiki to some other location, as it configures it to see the perl libraries there. See `doc/tips/nearlyfreespeech.mdwn` for an example of using this to install ikiwiki and its dependencies in a home directory.