Simon McVittie [Sat, 25 Jul 2009 19:04:04 +0000 (20:04 +0100)]
Remove now-unused function pagespec_merge
Now that dependencies are a list of pagespecs with an implicit "or"
operation, there's no need to try to merge pagespecs under normal use.
ikiwiki-transition contains the only use of the function, so move
it there rather than deleting it entirely (it's used to concatenate all
admins' lists of locked pages).
Simon McVittie [Thu, 18 Jun 2009 14:55:55 +0000 (15:55 +0100)]
calendar, inline, map: don't pre-join dependencies
The new dependency handling works better (eliminates more duplicates) if
dependencies are split up. On the same wiki mentioned in the previous
commit, this saves about a second (i.e. 4%) on the same test.
Simon McVittie [Thu, 18 Jun 2009 14:54:53 +0000 (15:54 +0100)]
Optimize the dependencies list
On a large wiki you can spend a lot of time reading through large lists
of dependencies to see whether files need to be rebuilt (album, with its
one-page-per-photo arrangement, suffers particularly badly from this).
The dependency list is currently a single pagespec, but it's not used like
a normal pagespec - in practice, it's a list of pagespecs joined with the
"or" operator.
Accordingly, change it to be stored as a list of pagespecs. On a wiki
with many tagged photo albums, this reduces the time to refresh after
`touch tags/*.mdwn` from about 31 to 25 seconds.
Getting the benefit of this change on an existing wiki requires a rebuild.
Joey Hess [Sun, 16 Aug 2009 17:45:10 +0000 (13:45 -0400)]
use pagespec_match_list for feedpages
This is both faster, and propigates any error in processing the feedpages
pagespec out to display on the page. Which may have been why I didn't use
it before, but currently seems like a good thing to do, since it explains
why your feeds are empty..
Joey Hess [Sun, 16 Aug 2009 02:18:05 +0000 (22:18 -0400)]
po: Better fix for missing underlay translation problem.
If a page is taken from the underlay, and one of the specified languages
does not have po files in the underlay, it would create a broken link
to the translated version of the page for that language.
Joey Hess [Sun, 16 Aug 2009 01:08:17 +0000 (21:08 -0400)]
replace N/A with 0
I think the N/A was not intended to be visible, but it can show up as the
percent translated to a language. This happens if the page is located in an
underlay, and not translated to the language in any other underlay.
Simon McVittie [Thu, 18 Jun 2009 14:32:55 +0000 (15:32 +0100)]
meta: depend on absolute page name, not relative
Previously, [[!meta redir="foo"]] on bar, where bar/foo exists, would
depend on "foo" (which matches nothing, probably) rather than "bar/foo".
(cherry picked from commit f27ec09b72f886415e63fe394e18d9c3cb3913bf)
Simon McVittie [Thu, 18 Jun 2009 14:34:48 +0000 (15:34 +0100)]
img: depend on absolute page name, not relative
Previously, [[!img bar.jpg]] on foo, where foo/bar.jpg exists, would
get a dependency equivalent to "glob(bar.jpg)" (which might not match
anything), rather than the correct "glob(foo/bar.jpg)".
(cherry picked from commit 85b2ec49ecd12dd23e5c432933457a72744ce7cb)
Joey Hess [Fri, 14 Aug 2009 05:11:53 +0000 (01:11 -0400)]
optimise brokenlinks by gathering the data when calculating backlinks
During backlink calulation, all links are examined and broken links can
be detected for free, so store a list of broken links and have brokenlinks
use it.
Exposing the %brokenlinks structure is a bit ugly, but the speedup seems
worth it: Around 1 second for wikis the size of the doc wiki that use
brokenlinks.
Joey Hess [Fri, 14 Aug 2009 01:41:33 +0000 (21:41 -0400)]
Add discussionpage configuration setting
By adding this setting, we get both more configurability, and a minor
optimisation too, since gettext does not need to be called continually
to get the Discussion value.