summaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
AgeCommit message (Collapse)Author
2009-09-11got rid of the postrefresh hook after allJoey Hess
Instead, use the change and delete hooks, and launch rsync if either hook is called.
2009-09-10Revivify unixauth and rsync plugins (and hook needed by rsync) lost inAmitai Schlair
the last merge. I should really put each feature on its own git branch.
2009-09-10remove hook not used by cvsJoey Hess
2009-08-30Merge branch 'master' of git://github.com/joeyh/ikiwikiAmitai Schlair
2009-08-28<pedant>rename depends_exact to depends_simpleJoey Hess
It's not "exact" since case munging has to be done, and I think "simple" captures the optimisation better.</pedant> With apologies to smcv, who probably has to rebuild his wiki now.
2009-08-28Avoid duplicating debug message for building a page due to a dependencySimon McVittie
As per Joey's review
2009-08-28Force %depends_exact to lower case, fixing incorrect case-sensitivitySimon McVittie
2009-08-28Fix typo in dependency debug messageSimon McVittie
2009-08-28Add depends_exact: simplified dependency tracking for dependencies on a ↵Simon McVittie
single page Let E be the number of dependencies per page of the form "A depends on B and nothing else", let D be the number of other dependencies per page, let P be the total number of pages, and let C be the number of changed pages in a refresh. This patch should speed up a refresh from O(E*C*P + D*C*P) to O(C + E*P + D*C*P), assuming that hash lookups are O(1). In practice, plugins like inline and map produce a lot of these very simple dependencies, and my album plugin's combination of inline with a large number of pages causes it to suffer particularly badly. In testing on a wiki with about 7000 objects (3500 full pages, 3500 images), a full rebuild continued to take about 5:30, and a refresh after touching about 350 pages and 350 images reduced from 5:30 to 1:30. As with my previous optimizations, this change will result in downgrades not working correctly until the wiki is rebuilt.
2009-08-25don't use pagespec_match_listJoey Hess
This should be more efficient than pagespec_match_list since it short-circuits after the first match is found. The other problem with using pagespec_match_list here is it may throw an error if a bad or failing pagespec somehow got into the dependencies.
2009-08-25use pagespec_match_listSimon McVittie
2009-08-25Use a hash to de-duplicate dependenciesSimon McVittie
2009-08-24Optimize the dependencies listSimon McVittie
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.
2009-08-23Add rsync plugin, though the only rsync-specific thing about it is theAmitai Schlair
assumption that uploading an entire site is efficient.
2009-08-14optimise brokenlinks by gathering the data when calculating backlinksJoey Hess
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.
2009-08-13Add discussionpage configuration settingJoey Hess
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.
2009-08-12fix some more foreaches that clal functions to not use $_Joey Hess
2009-07-31Merge commit 'remotes/smcv/ready/among'Joey Hess
2009-07-23Change rendering→building in translatable strings, to ease translations.Jonas Smedegaard
2009-07-20split two helper functions of of render()Joey Hess
2009-07-17IkiWiki::Render: split out backlink_pages() function from backlinks()Simon McVittie
This separates style from content - backlinks() performs lossy transformations on the page names to get it in the form that the page template wants.
2009-06-09Disable the Preferences link if no plugin with an auth hook is enabled.Joey Hess
2009-06-04fix further places where translated discussion case was assumedJoey Hess
Another benefit is that consistently using gettext("Discussion") eliminates the need to translate one string.
2009-06-04Avoid relying on translators preserving the case when translating ↵Joey Hess
"discussion", which caused Discussion pages to get unwanted Discussion links.
2008-12-17Coding style change: Remove explcit vim folding markers.Joey Hess
2008-10-30set ctime in --render mode if not knownJoey Hess
Avoids some uninitialised value warnings.
2008-10-29fix display of error msgJoey Hess
2008-10-19fix relativedate timezone inclusionJoey Hess
The machine parseable date needs to include a timezone. Also, simplified the interface for date display.
2008-10-17relativedate: New javascript-alicious plugin that makes all dates display ↵Joey Hess
relative, in a very nice way, if I say so myself.
2008-09-29use gettextJoey Hess
2008-09-23Print a debug message if a page has multiple source files.Joey Hess
2008-09-05editpage: New core plugin factoring out page editing to allow disabling it ↵Joey Hess
if desired.
2008-07-26historyurl can be undefJoey Hess
2008-07-23Rebuild pages that change their type.Gabriel McManus
Previously, if a page changed its type but not its mtime (e.g. mv page.txt page.mdwn), then it would not be rebuilt. Now, check if the source of a page has changed, in which case force a rebuild of that page. (cherry picked from commit b6a3b8a683fed7a7f6d77a5b3f2dfbd14c849843)
2008-07-21Add allow_symlinks_before_srcdir config settingJoey Hess
can be used to avoid a security check that is a good safe default, but problimatic overkill in some situations. I decided to underdocument this, because the option looks ugly, and I don't want people randomly turning it on because it looks like a good idea. So if you need it, you'll get an error message mentioning how to fix it.
2008-07-17Add a postscan hook.Joey Hess
* Add a postscan hook. * search: Use postscan hook, avoid updating index when previewing.
2008-07-15pedigree rename to parentlinks: rename/adapt everythingintrigeri
* Renamed to parentlinks every single variable or function called pedigree * Removed the parentlinks function from Render.pm * Enabled the new parentlinks plugin by default * Adapted testsuite and documentation to reflate the above facts Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-12avoid hardlinking files owned by othersJoey Hess
If hardlinks are enabled, it would hardlink files from the underlay. That was sorta annoying if you tried to edit by hand for some reason, so let's not. Files that are hardlinked should be rare enough that a few extra stats won't hurt.
2008-07-06editpage escaping fixesJoey Hess
* The editpage form now uses the raw page name, not the page title, in its 'page' cgi parameter. Using the title was ambiguous and made it impossible to tell between some pages, like "foo/bar" and "foo__47__bar", sometimes causing the wrong page to be edited. * This change means that some edit links need to be updated. Force a rebuild on upgrade to this version. * Above change also allowed really fixing escaped slashes from the blogpost form.
2008-07-01fix expensive move code pathJoey Hess
2008-07-01break out fast_file_copyJoey Hess
2008-06-04Pass a destpage parameter to the sanitize hook.Joey Hess
Because the search plugin needed it, also because it's one of the few plugins that didn't already have it. I also considered adding it to htmlize, but I really cannot imagine caring what the destpage is when htmlizing. (I'll probably be poven wrong later.)
2008-06-04Filter hooks are no longer called during the scan phase. This will prevent ↵Joey Hess
wikilinks added by filters from being scanned properly. But no known filter hook does that, and calling filters unncessarily during scan slowed down complex filters such as the one used to update the xapian index.
2008-05-08load plugins before printing messagesJoey Hess
This allows plugins to getopt and change what is done before an incorrect line is printed.
2008-05-07amazon s3 support implemented and kinda workingJoey Hess
pruning not yet implemented, however
2008-05-07Optimised file statting code when scanning for modified pages; cut the ↵Joey Hess
number of system calls in half. (Still room for improvement.)
2008-03-29Added a hardlink option in the setup file, useful if the source and dest are ↵Joey Hess
on the same filesystem and the wiki includes large media files, which would normally be copied, wasting time and space.
2008-02-24avoid calling getctime on internal pagesJoey Hess
internal pages won't be in revision control so this avoids some ugly noise
2008-02-11* Add the linkify and scan hooks. These hooks can be used to implementJoey Hess
custom, first-class types of wikilinks. * Move standard wikilink implementation to a new wikilink plugin, which will of course be enabled by default.
2008-02-09* Page templates can now use CTIME to show when the page was created.Joey Hess