ikiwiki/doc/plugins
Joey Hess 2a7721febd Avoid %links accumulating duplicates. (For TOVA)
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.
2009-05-06 00:27:24 -04:00
..
aggregate fix a few directives using the old syntax 2008-12-23 16:25:52 -05:00
amazon_s3
autoindex 2008-10-30 08:28:28 -04:00
calendar 2008-11-26 11:42:10 -05:00
comments Fix documentation of anonok_pagespec. Closes: #521793 2009-03-30 13:07:50 -04:00
conditional Migrate escaped directives (\[[) in doc/plugins to have \[[! prefix 2008-07-21 12:46:35 +01:00
contrib po: answered Joey, at last 2009-04-20 11:53:04 +02:00
creole update deps and bundles 2009-02-12 13:15:23 -05:00
editdiff 2008-09-17 15:01:18 -04:00
filecheck filecheck: Fall back to testing for binary or plain text files if no mime type is detected. 2008-09-01 15:00:15 -04:00
format response 2008-11-10 13:30:20 -05:00
google apply patch to fix googleform xhtml 2009-02-14 02:38:17 -05:00
haiku
hnb finish including hnb plugin 2008-06-15 16:27:08 -04:00
htmlbalance use HTML::Entities 2008-11-17 14:27:11 -05:00
img response 2008-11-05 13:30:26 -05:00
map Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
mdwn shortcut: If default_pageext is set, first look for shortcuts.default_pageext 2009-02-12 13:04:20 -05:00
meta rename preprocessordirective to directive 2008-08-25 14:19:39 -04:00
openid
orphans problem fixed 2008-10-09 19:15:39 -04:00
passwordauth passwordauth/discussion: Cosmetics 2009-04-30 00:24:41 +02:00
pingee
rawhtml
recentchanges response; move to bug report 2008-07-02 16:43:13 -04:00
rst
search
shortcut shortcut: If default_pageext is set, first look for shortcuts.default_pageext 2009-02-12 13:04:20 -05:00
table * Response 2008-09-05 05:21:56 -04:00
tag Fix wikilink to correct todo page 2009-02-20 05:05:57 -05:00
teximg
toc
toggle web commit by http://alcopop.org/me/openid/: nudge headers down to h2 2008-07-03 11:41:36 -04:00
txt rename discussion page to match plugin name 2008-07-29 15:40:07 -04:00
type relativedate: New javascript-alicious plugin that makes all dates display relative, in a very nice way, if I say so myself. 2008-10-17 20:47:32 -04:00
write finalise version 3.00 of the plugin api 2008-12-23 16:34:19 -05:00
404.mdwn add instruction of lighttpd 2009-02-11 01:56:01 -05:00
aggregate.mdwn enable aggregate_internal by default 2008-12-23 16:08:21 -05:00
amazon_s3.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
anonok.mdwn Fix documentation of anonok_pagespec. Closes: #521793 2009-03-30 13:07:50 -04:00
attachment.mdwn tag updates 2008-10-09 16:58:25 -04:00
autoindex.mdwn tune 2008-07-29 16:02:24 -04:00
blogspam.mdwn 2009-04-26 13:50:33 -04:00
brokenlinks.mdwn move demo back to plugin page 2008-09-11 17:17:10 -04:00
calendar.mdwn Typo. 2009-01-17 09:56:50 -05:00
camelcase.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
color.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
comments.mdwn add a button to prefs page for comment moderation 2009-01-25 19:04:45 -05:00
conditional.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
contrib.mdwn remove globlist support 2008-12-23 17:11:04 -05:00
creole.mdwn more details on ikiwiki directives 2009-02-10 08:10:13 -05:00
cutpaste.mdwn Fix cut'n'past-o. 2008-12-11 19:36:36 -05:00
ddate.mdwn relativedate: New javascript-alicious plugin that makes all dates display relative, in a very nice way, if I say so myself. 2008-10-17 20:47:32 -04:00
discussion.mdwn remove deprecated googlecalendar plugin 2008-12-24 16:22:35 -05:00
editdiff.mdwn tag updates 2008-10-09 16:58:25 -04:00
editpage.mdwn editpage: New core plugin factoring out page editing to allow disabling it if desired. 2008-09-05 13:57:25 -04:00
edittemplate.mdwn tag updates 2008-10-09 16:58:25 -04:00
embed.mdwn formatting 2008-12-31 15:28:03 -05:00
favicon.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
filecheck.mdwn filecheck: New plugin factoring out the PageSpec additions that were originally part of the attachment plugin. 2008-08-25 19:52:34 -04:00
format.mdwn format: New plugin, allows embedding differntly formatted text inside a page (ie, otl inside a mdwn page, or syntax highlighted code inside a page). 2008-10-31 16:42:20 -04:00
fortune.mdwn move example back to plugin 2008-09-11 17:29:08 -04:00
goodstuff.mdwn repolist: New plugin to support the rel=vcs-* microformat. 2009-01-07 16:07:46 -05:00
google.mdwn document google plugin 2008-10-10 17:13:33 -04:00
goto.mdwn rename apache404 -> 404 2009-01-31 19:26:36 -05:00
graphviz.mdwn move example back 2008-09-11 17:31:26 -04:00
haiku.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
hnb.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
html.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
htmlbalance.mdwn adding htmlbalance; housekeeping 2008-11-17 14:09:53 -05:00
htmlscrubber.mdwn deprecate embed plugin too 2008-12-26 15:27:49 -05:00
htmltidy.mdwn htmlbalance: new plugin that balances tags by parsing and re-serializing 2008-11-17 10:46:21 +00:00
httpauth.mdwn httpauth: Document that ikiwiki.cgi has to be in a directory subject to authentication. Closes: #500524 2008-09-30 21:03:51 -04:00
img.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
inline.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
install.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
link.mdwn Use non-deprecated wikilink page (ikiwiki/wikilink) 2008-09-08 08:36:29 -04:00
linkmap.mdwn move example 2008-09-11 17:41:33 -04:00
listdirectives.mdwn Fix typo 2008-09-11 23:02:02 -04:00
lockedit.mdwn add link to untrusted git push 2008-12-26 15:06:00 -05:00
map.mdwn re-add demo, was lost in will's changes 2008-09-11 17:44:46 -04:00
mdwn.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
meta.mdwn meta: Plugin is now enabled by default since the basewiki uses it. 2008-11-06 16:08:11 -05:00
mirrorlist.mdwn remove ikiwiki.setup 2008-07-26 22:55:39 -04:00
more.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
opendiscussion.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
openid.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
orphans.mdwn move demo back to plugin and add example 2008-09-11 17:51:27 -04:00
otl.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
pagecount.mdwn fix 2008-12-17 20:19:12 -05:00
pagestats.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
pagetemplate.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
parentlinks.mdwn move complex examples to a tip 2008-07-16 17:43:57 -04:00
passwordauth.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
pingee.mdwn updates 2008-10-24 13:29:41 -04:00
pinger.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
poll.mdwn tag updates 2008-10-09 16:58:25 -04:00
polygen.mdwn move demo back to plugin page 2008-09-11 18:00:25 -04:00
postsparkline.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
prettydate.mdwn relativedate: New javascript-alicious plugin that makes all dates display relative, in a very nice way, if I say so myself. 2008-10-17 20:47:32 -04:00
progress.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
rawhtml.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
recentchanges.mdwn Migrate escaped directives (\[[) in doc/plugins to have \[[! prefix 2008-07-21 12:46:35 +01:00
recentchangesdiff.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
relativedate.mdwn add a more useful example of a relative date ;-) 2008-11-05 13:21:16 -05:00
remove.mdwn tag updates 2008-10-09 16:58:25 -04:00
rename.mdwn tag updates 2008-10-09 16:58:25 -04:00
repolist.mdwn repolist: New plugin to support the rel=vcs-* microformat. 2009-01-07 16:07:46 -05:00
rst.mdwn wording 2008-10-29 18:05:56 -04:00
search.mdwn tag updates 2008-10-09 16:58:25 -04:00
shortcut.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
sidebar.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
signinedit.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
smiley.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
sparkline.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
table.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
tag.mdwn rename tag() to tagged(); add docs 2009-02-19 18:54:25 -05:00
template.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
testpagespec.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
teximg.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
textile.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
toc.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
toggle.mdwn misc minor changes 2008-09-11 18:29:07 -04:00
txt.mdwn fix link 2008-09-11 19:36:35 -04:00
typography.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
underlay.mdwn Document underlay plugin as included 2009-01-18 16:43:07 +00:00
version.mdwn tag updates 2008-10-09 16:58:25 -04:00
websetup.mdwn tag updates 2008-10-09 16:58:25 -04:00
wikitext.mdwn Migrate doc/plugins via prefix_directives 2008-07-21 12:31:57 +01:00
wmd.mdwn look for wmd/wmd.js 2009-03-07 19:23:38 -05:00
write.mdwn Avoid %links accumulating duplicates. (For TOVA) 2009-05-06 00:27:24 -04:00