Commit Graph

7351 Commits (2a7721febd6cac1af5e7f4b4949ffe066c62c837)

Author SHA1 Message Date
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
Joey Hess 1c7c9e95f2 decruft 2009-05-05 23:27:29 -04:00
http://ghee.livejournal.com/ a258e92c78 meh 2009-05-05 23:09:20 -04:00
Joey Hess ad2f1805a9 response 2009-05-05 14:28:42 -04:00
Joey Hess 39717d0dbf Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2009-05-05 14:25:08 -04:00
Joey Hess 7f6ebcd53e response 2009-05-05 14:24:55 -04:00
http://lj.rossia.org/users/imz/ 31240a9dd6 minor: fix URL 2009-05-05 14:24:41 -04:00
http://lj.rossia.org/users/imz/ e92ecd3e27 almost offtopic: is this actually a violation? 2009-05-05 14:21:38 -04:00
http://liw.fi/ 7633cc8474 2009-05-05 14:16:57 -04:00
Joey Hess 5636b62829 ikiwiki-makerepo: Avoid using abs_path, as it apparently fails on nonexistant directories with some broken perl versions. 2009-05-05 14:15:28 -04:00
http://lj.rossia.org/users/imz/ 0ee6705413 minor: trying to format the "verbatims" correctly 2009-05-05 13:46:25 -04:00
http://lj.rossia.org/users/imz/ 3a0d736412 added a clarifiaction about my understanding of what happens 2009-05-05 13:44:18 -04:00
http://lj.rossia.org/users/imz/ 39679d3a53 a problem with /etc/ikiwiki/auto.setup, perl and non-existent paths 2009-05-05 13:39:59 -04:00
http://stefano.zacchiroli.myopenid.com/ 50d6abf28b 2009-05-05 04:41:15 -04:00
Joey Hess dd175cda87 add news item for ikiwiki 3.11 2009-05-04 16:35:59 -04:00
Joey Hess 8d5cd86593 response 2009-05-04 14:34:05 -04:00
Kai Hendry de26854d76 HTML5 story update 2009-05-04 11:08:27 +02:00
Kai Hendry a86fade7a9 anon commit test 2009-05-04 10:41:14 +02:00
simonraven 147828c62d 2009-05-02 21:21:39 -04:00
http://lj.rossia.org/users/imz/ 714f0e65cb a clarifying comment about a tool which is referred to 2009-05-02 13:30:17 -04:00
http://jmtd.net/ 559c0c42c8 published at http://github.com/jmtd/ikiwiki_todolist/ 2009-05-02 09:26:37 -04:00
http://jmtd.net/ 9e69aa5747 WIP todo list javascript in a demonstratable state 2009-05-02 07:54:00 -04:00
http://schmonz.livejournal.com/ 9e40564ecb personal experience 2009-04-30 15:18:40 -04:00
Jérémy Bobbio 19aa754ff5 passwordauth/discussion: Cosmetics 2009-04-30 00:24:41 +02:00
Jérémy Bobbio 0a6879a139 passwordauth/discussion: Document an attempt of using Apache::AuthenHook for a restricted wiki 2009-04-30 00:21:37 +02:00
albertlash 22421218d2 2009-04-28 19:42:18 -04:00
simonraven b2675a77c8 2009-04-28 19:12:52 -04:00
simonraven 31826c8b97 2009-04-28 19:11:38 -04:00
simonraven d6b095b06c 2009-04-28 17:46:21 -04:00
simonraven 0e8f7c336d 2009-04-28 16:42:35 -04:00
simonraven 972220412f 2009-04-28 16:14:44 -04:00
simonraven b8be54db22 s/choosen/chosen/ 2009-04-28 01:41:12 -04:00
Joey Hess a1bbeec148 translation.mdwn: Typo fixes. Closes: #525753 2009-04-27 13:57:35 -04:00
Joey Hess df9801a371 mention po plugin 2009-04-27 13:56:56 -04:00
TimBosse c70ae749a1 removed 2009-04-27 10:12:22 -04:00
TimBosse ca597d4edf 2009-04-26 23:58:47 -04:00
TimBosse 018548fb51 2009-04-26 23:51:30 -04:00
TimBosse cfbb3c03cf 2009-04-26 23:50:08 -04:00
http://jmtd.net/ 701982423a htmlscrubber? 2009-04-26 17:08:10 -04:00
simonraven 7b46399c8e 2009-04-26 16:17:41 -04:00
http://stefano.zacchiroli.myopenid.com/ c876ee825b 2009-04-26 13:50:33 -04:00
simonraven 4202dab92c 2009-04-25 15:57:31 -04:00
Jon Dowland 31fff76651 add a ' ' to prevent autosmiley eating a ) 2009-04-24 14:44:28 +01:00
Jon Dowland e1d0b1529b another backlinks issue 2009-04-24 14:41:25 +01:00
Jon Dowland b9b7dfa176 backlinks issue 2009-04-24 14:40:07 +01:00
Jon Dowland 24177f8433 interactive todo lists todo item 2009-04-24 14:34:32 +01:00
Jon Dowland 5dd1e09750 new todo item: more flexible inline postform 2009-04-24 14:26:45 +01:00
NicolasLimare 8656029c02 2009-04-24 05:48:03 -04:00
Joey Hess aa306957ba pagespec_match_list added and used in most appropriate places
* pagespec_match_list: New API function, matches pages in a list
  and throws an error if the pagespec is bad.
* inline, brokenlinks, calendar, linkmap, map, orphans, pagecount,
  pagestate, postsparkline: Display a handy error message if the pagespec
  is erronious.
2009-04-23 15:45:30 -04:00
Joey Hess 748aa7af77 pagespec error/failure distinction and error display by inline
* Add IkiWiki::ErrorReason objects, and modify pagespecs to return
  them in cases where they fail to match due to a configuration or syntax
  error.
* inline: Display a handy error message if the inline cannot display any
  pages due to such an error.

This is perhaps somewhat incomplete, as other users of pagespecs do not
display the error, and will eventually need similar modifications to inline.
I should probably factor out a pagespec_match_all function and make it throw
ErrorReasons.
2009-04-23 14:07:28 -04:00