aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
Commit message (Collapse)AuthorAge
* fix inverted testJoey Hess2009-12-02
|
* fix bestlink to not return just-deleted pagesJoey Hess2009-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | bestlink was looking at whether %links existed for a page in order to tell if the page exists, but just-deleted pages still have entries in there (for reasons it may be best not to explore). So bestlink would return just-deleted pages. Instead, make bestlink use %pagesources. Also, when finding a deleted page, %pagecase was not cleared of that page. This, again, made bestlink return just-deleted pages. Now that is cleared. Fixing bestlink exposed another issue though. The backlink calculation code uses bestlink. So when a page was deleted, no backlinks to it are found, and pages that really did backlink to it were not updated, and had broken links. To fix that, the code that actually removes deleted pages had to be split out from find_del_files, so it can run a bit later. It is run just after backlinks are calculated. This way, backlink calculation still sees the deleted pages, but everything afterwards does not. However, it does not address the original bug report that started this whole thing, [[bugs/bestlink_returns_deleted_pages]]. Because there bestlink is run in the needsbuild hook. And that happens before backlink calculation, and so bestlink still returns deleted pages then. Also in the scan hook. If bestlink needs to work consistently during those hooks, a more involved fix will be needed.
* Moved the postscan hook to run on the raw html of a page, before the ↵Joey Hess2009-11-08
| | | | template is filled out. This improves the search plugin's indexing, since it will not include navigational elements from the page template or sidebar.
* Fix a bug introduced in the last version that caused ikiwiki to skip all ↵Joey Hess2009-10-21
| | | | files if a sourcedir of "./" was specified.
* Merge branch 'master' into dependency-typesJoey Hess2009-10-08
|\ | | | | | | | | | | | | Conflicts: IkiWiki.pm IkiWiki/Render.pm debian/changelog
| * Optimize away most expensive file prune calls, when refreshingJoey Hess2009-10-08
| | | | | | | | | | | | | | | | Benchmarking refresh of a a wiki with 25 thousand pages showed file_pruned() using most of the time. But, when refreshing, ikiwiki already knows about nearly all the files. So we can skip calling file_pruned() for those it knows about. While tricky to do, this sped up a refresh (that otherwise does no work) by 10-50%.
* | fix backlink new change detection codeJoey Hess2009-10-07
| |
* | typoJoey Hess2009-10-06
| |
* | fix support of a single dependency that combines links and exists typesJoey Hess2009-10-06
| | | | | | | | | | | | This is very common, and the code has to test each type differently, since the list of candidates to test, as well as the test, will vary per type. Much happier with this code now.
* | fix handling of links+content dependencyJoey Hess2009-10-06
| | | | | | | | Such a dependency is unlikely, but can happen.
* | refactor 3Joey Hess2009-10-06
| | | | | | | | Only left one new global
* | refresh refactor 2Joey Hess2009-10-06
| | | | | | | | killed one global
* | split up refreshJoey Hess2009-10-05
| | | | | | | | I'd rather have the global variables than the 300 line function
* | new link change detection method and general code reworkJoey Hess2009-10-05
| | | | | | | | | | | | | | | | | | | | | | | | This new method for determining when links on pages have changed should be more efficient, since it avoids double calculation of the bestlinks. It also allows collecting data about the old links, before the scan pass, so the data is accurate when pages move around and bestlinks change. Also got some code back to a saner indent level.
* | make links dependencies fire if broken links changeJoey Hess2009-10-05
| |
* | implement links dependenciesJoey Hess2009-10-05
| | | | | | | | | | | | | | Involved some code refactoring so that same code that detects link changes for backlinks updating can be used for link dependency checking. The nice thing is that link dep checking is thus comopletly free!
* | typosJoey Hess2009-10-05
| |
* | rework dependency types codeJoey Hess2009-10-04
| | | | | | | | | | Simplify, change default content depends number to 1, change interface to make more sense.
* | Merge branch 'dependency-types' into transitive-dependenciesJoey Hess2009-10-04
|\ \ | | | | | | | | | | | | Conflicts: IkiWiki/Render.pm
| * | implement support for DEPEND_EXISTSJoey Hess2009-10-03
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Preliminary support, anyway. If a dependency only includes DEPEND_EXISTS, then only changes that involved adding or deleting a page can trigger it. This is complicated by internal pages, since the code did not previously differentiate between add, delete, and change of internal pages. Now it tracks change separately from add+delete, so DEPEND_EXISTS pagespecs that actually match internal pages (which will probably be quite rare in practice) should work.
* | minor optimisationJoey Hess2009-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As soon as a change happens, we know we will need to rescan all dependencies from the start, so bail out of the current scan partway to avoid doing redundant work. Only problem with this is that ikiwiki sometimes ends up printing out dependencies that, while correct, are not obvious. Before: building B, which depends on A building C, which depends on A building D, which depends on A After: building B, which depends on A building C, which depends on B building D, which depends on C
* | handle transitive dependencies by re-running dep resolverJoey Hess2009-10-02
|/ | | | This is a rather expensive solution to the transitive dependency problem.
* got rid of the postrefresh hook after allJoey Hess2009-09-11
| | | | | Instead, use the change and delete hooks, and launch rsync if either hook is called.
* Revivify unixauth and rsync plugins (and hook needed by rsync) lost inAmitai Schlair2009-09-10
| | | | the last merge. I should really put each feature on its own git branch.
* remove hook not used by cvsJoey Hess2009-09-10
|
* Merge branch 'master' of git://github.com/joeyh/ikiwikiAmitai Schlair2009-08-30
|\
| * <pedant>rename depends_exact to depends_simpleJoey Hess2009-08-28
| | | | | | | | | | | | | | 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.
| * Avoid duplicating debug message for building a page due to a dependencySimon McVittie2009-08-28
| | | | | | | | As per Joey's review
| * Force %depends_exact to lower case, fixing incorrect case-sensitivitySimon McVittie2009-08-28
| |
| * Fix typo in dependency debug messageSimon McVittie2009-08-28
| |
| * Add depends_exact: simplified dependency tracking for dependencies on a ↵Simon McVittie2009-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * don't use pagespec_match_listJoey Hess2009-08-25
| | | | | | | | | | | | | | | | 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.
| * use pagespec_match_listSimon McVittie2009-08-25
| |
| * Use a hash to de-duplicate dependenciesSimon McVittie2009-08-25
| |
| * Optimize the dependencies listSimon McVittie2009-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * optimise brokenlinks by gathering the data when calculating backlinksJoey Hess2009-08-14
| | | | | | | | | | | | | | | | | | | | 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.
| * Add discussionpage configuration settingJoey Hess2009-08-13
| | | | | | | | | | | | 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.
* | Add rsync plugin, though the only rsync-specific thing about it is theAmitai Schlair2009-08-23
|/ | | | assumption that uploading an entire site is efficient.
* fix some more foreaches that clal functions to not use $_Joey Hess2009-08-12
|
* Merge commit 'remotes/smcv/ready/among'Joey Hess2009-07-31
|\
| * IkiWiki::Render: split out backlink_pages() function from backlinks()Simon McVittie2009-07-17
| | | | | | | | | | | | This separates style from content - backlinks() performs lossy transformations on the page names to get it in the form that the page template wants.
* | Change rendering→building in translatable strings, to ease translations.Jonas Smedegaard2009-07-23
| |
* | split two helper functions of of render()Joey Hess2009-07-20
|/
* Disable the Preferences link if no plugin with an auth hook is enabled.Joey Hess2009-06-09
|
* fix further places where translated discussion case was assumedJoey Hess2009-06-04
| | | | | Another benefit is that consistently using gettext("Discussion") eliminates the need to translate one string.
* Avoid relying on translators preserving the case when translating ↵Joey Hess2009-06-04
| | | | "discussion", which caused Discussion pages to get unwanted Discussion links.
* Coding style change: Remove explcit vim folding markers.Joey Hess2008-12-17
|
* set ctime in --render mode if not knownJoey Hess2008-10-30
| | | | Avoids some uninitialised value warnings.
* fix display of error msgJoey Hess2008-10-29
|
* fix relativedate timezone inclusionJoey Hess2008-10-19
| | | | | | The machine parseable date needs to include a timezone. Also, simplified the interface for date display.