1 Currently each time ikiwiki runs a refresh, it has to traverse the entire
2 directory tree, looking at each file, to determine what has changed.
4 Profiling shows this can take many seconds on large sites, and tends to be
5 where around half the time is spent (other half being loadindex/saveindex).
7 This could be sped up by remembering the HEAD ref that was rendered last,
8 and using git log to get a list of files changed since then. Only render
11 Looking at the current implementation, the list of all files in the tree is
12 also used when eg, iterating to find pages that need to be changed because
13 one of their dependencies has changed. That would need to be modified,
14 probably to use info from loadindex instead (ie, values %pagesources), with
15 added/removed files added/removed from it.
17 The actual git log parsing would be easy to add; there is already code to
18 parse git-log in raw form.
20 The main complication would probably be files in the tree that are not
21 checked into git would not be rendered. The underlay dirs would still need
22 to be scanned as now, as would the transient directory. Since some sites
23 may depend on files being put into the tree and not committed, this
24 optimisation would probably need to be something that can be optionally