aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
Commit message (Collapse)AuthorAge
...
* match_link: dynamic influence needed for page that currently has no linksJoey Hess2009-10-13
|
* add_depends: optimise influence calculationJoey Hess2009-10-09
| | | | | | | | I made match_* functions whose influences can vary depending on the page matched set a special "" influence to indicate this. Then add_depends can try just one page, and if static influences are found, stop there.
* rework influence calculationJoey Hess2009-10-09
| | | | | | | | | Thought of a cleaner way to accumulate all influences in pagespec_match_list, using the pagespec_match result object as an accumulator. (This also accumulates all influences from failed matches, rather than just one failed match. I'm not sure if the old method was correct.)
* fix pagespec_match_list handling of list parameterJoey Hess2009-10-09
|
* pagespec_match_list: change limit to filterJoey Hess2009-10-09
|
* pagespec_match_list allow additional pagespec limit parameters againJoey Hess2009-10-09
|
* conditional: use yesnoJoey Hess2009-10-09
|
* rename use_pagespec to pagespec_match_listJoey Hess2009-10-08
| | | | | To avoid breaking plugins, also support the old pagespec_match_list calling convention, with a deprecation warning.
* 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%.
* | use_pagespec: do not fail with error when unable to match, unless it failsJoey Hess2009-10-08
| | | | | | | | with an ErrorReason
* | add use_pagespec and deptype functionsJoey Hess2009-10-08
| |
* | fix handling of influences of pagespecs that fail to matchJoey Hess2009-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a pagespec fails to match, I had been throwing the influences away, but that is not right. Consider `backlink(foo)`, where foo does not exist. It still needs to be added as an influence, because if it is created, it will influence the pagespec to match. But with that fix, `link(bar)` had as influences all pages, whether they link to bar or not. Which is not necessary, because modifiying a page to add a link to bar will directly cause the pagespec to match. So, in match_link (and all the match_* functions for page metadata), only return an influence if the match succeeds. match_backlink had been implemented as the inverse of match_link, but that is no longer completly true. While match_link does not return an influence on failure, match_backlink does. match_created_before/after also return the influence on failure, this way if created_after(foo) currently fails because foo does not exist, it will still update the page with the pagespec if foo is created.
* | bugfixJoey Hess2009-10-07
| |
* | add type info to influence informationJoey Hess2009-10-07
| |
* | convert add_depends to use influencesJoey Hess2009-10-07
| | | | | | | | | | | | No more horrible special-case pagespec parsing. OTOH, matching over all pages to determine influences is a lot of work.
* | add influence info to match_*Joey Hess2009-10-07
| | | | | | | | Also update docs, test suite.
* | make success and failreason objects carry an influences hashJoey Hess2009-10-07
| | | | | | | | | | | | | | | | | | | | The hash will be used used to record a set of pages that influenced the result of a pagespec match. The influences are merged together when boolean and/or are encountered in a pagespec. That means using a non-short-circuiting OR operator. And so I use & and | when translating pagespecs, since those bitwise operators can be overloaded. ("and" and "or" cannot, apparently).
* | add_depends should default to content dependencies if unknown type specifiedJoey Hess2009-10-06
| |
* | oops!!Joey Hess2009-10-06
| |
* | support backlink() in pagespecs for links dependenciesJoey Hess2009-10-06
| |
* | 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!
* | add test suite for add_dependsJoey Hess2009-10-04
| | | | | | | | and found a bug in my bitmath..
* | Merge branch 'master' into dependency-typesJoey Hess2009-10-04
|\|
| * remove /i from regexpJoey Hess2009-10-04
| | | | | | | | Nothing case-oriented going on in here.
* | rework dependency types codeJoey Hess2009-10-04
| | | | | | | | | | Simplify, change default content depends number to 1, change interface to make more sense.
* | expand the set of things that can be matched contentlessJoey Hess2009-10-04
| |
* | optimise add_depends for simple pagespecsJoey Hess2009-10-04
| | | | | | | | We don't need to check if the pagespec is contentless; all simple ones are.
* | detect pagespecs that require content dependenciesJoey Hess2009-10-04
| | | | | | | | | | | | | | | | | | When adding a contentless dependency, the pagespec also needs to be one that does not look at any page content information. As a first approximation of that, only allow glob-based pagespecs in contentless dependencies. While there are probably a few other types of pagespecs that can match contentless, this will work for most of them.
* | add dependency type parameters to add_dependsJoey Hess2009-10-03
|/ | | | | | | | | | | | | | | Dependency types are represented by bits in the values of the %depends and %depends_simple hashes. Change the dependslist array saved to the index to a depends hash. depends_simple is also converted from an array to a hash. Note that the depends field used to be a string, and we still have compat code to handle upgrades from that, as well as from the arrays. I didn't use ikiwiki-transition because I don't want ikiwiki to break if users forget to run it; also we're going to recommend a full rebuild on upgrade to this version to get the improved dependency handling. So this compat code can be removed or moved to ikiwiki-transition later.
* Fix a bug that could lead to duplicate links being recorded for tags.Joey Hess2009-10-03
| | | | | | | | | | Here I was bitten by perl's aliasing of foreach variables to the loop array contents, and match_link accidentially changed the contents of %links. In Jon's testcase, a tag added an absolute link, which was made relative by the above bug, and then the link was added again in preprocess, and turned into a duplicate.
* do not need to qualify %linksJoey Hess2009-10-03
|
* Merge branch 'master' into cvsJoey Hess2009-09-10
|\
| * Fix parsing web commits from ipv6 addresses.Joey Hess2009-09-10
| | | | | | | | | | | | | | | | I weakended the regexp, so this matches ipv6 addresses too. It does not ensure that the address is valid, but that should not matter here. Note that addresses ending in "::" are not matched, so eg, the unspecified address will not match -- but should never appear here anyway.
| * underlay: Also allow configuring additional directories to search for ↵Joey Hess2009-09-08
| | | | | | | | template files in.
| * memoize template_fileJoey Hess2009-09-08
| | | | | | | | | | This avoids a lot of unncessary stats, and trims about 1 second off a docwiki rebuild here.
* | 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.
| * Force %depends_exact to lower case, fixing incorrect case-sensitivitySimon McVittie2009-08-28
| |
| * Auto-detect "simple dependencies" instead of requiring callers to use ↵Simon McVittie2009-08-28
| | | | | | | | add_depends_exact()
| * 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.
| * Merge commit 'remotes/smcv/ready/remove-pagespec-merge'Joey Hess2009-08-25
| |\
| | * Remove now-unused function pagespec_mergeSimon McVittie2009-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * | Revert "Allow add_depends to take an arrayref"Joey Hess2009-08-25
| |/ | | | | | | | | | | This reverts commit e4cd168ebedd95585290c97ff42234344bfed46c. There was no benefit to this change.
| * IkiWiki::pagename: memoize resultsSimon McVittie2009-08-25
| | | | | | | | | | This relies for its correctness on %config, %hooks and pagetype() not changing.
| * Allow add_depends to take an arrayrefSimon McVittie2009-08-25
| |
| * Use a hash to de-duplicate dependenciesSimon McVittie2009-08-25
| |
| * Don't bother to save {depends} to the indexSimon McVittie2009-08-24
| | | | | | | | As per Joey's review.
| * 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.
| * created_before/after: throw error if specified page does not existJoey Hess2009-08-16
| | | | | | | | | | This assumes that no ctime means the page doesn't exist, which seems reasonable.