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. |
||
---|---|---|
.. | ||
.gitignore | ||
NEWS | ||
README.Debian | ||
changelog | ||
compat | ||
control | ||
copyright | ||
docs | ||
examples | ||
link | ||
postinst | ||
preinst | ||
rules |
README.Debian
It's a good idea, and in some cases a requirement, to rebuild your wikis when upgrading to a new version of ikiwiki. If you have a lot of different wikis on a system, this can be a pain to do by hand, and it's a good idea to automate it anyway. This Debian package of ikiwiki supports rebuilding wikis on upgrade. It will run ikiwiki-mass-rebuild if necessary when upgraded. The file /etc/ikiwiki/wikilist lists the setup files of wikis to rebuild, as well as the user who owns the wiki. Edit this file and add any wikis you set up. You can also allow users to maintain their own list of wikis to rebuild, by listing their usernames in /etc/ikiwiki/wikilist without corresponding setup files. ikiwiki will then read their lists of wikis from .ikiwiki/wikilist in their home directories. The examples directory contains the source to some example wiki setups.