
9 Feb
2009
9 Feb
'09
12:21 p.m.
John Maddock wrote:
Time taken for a 1000 page doc is not 10x the time for a 100 page doc: some things, certainly index generation (which we're not using at present, but I'm experimenting with now) and also seemingly hyperlinking and document outlining require more than O(N) time, probably more like O(N^2) for indexing.
XSLT has a feature called "keys" that lets you re-write O(n^2) code to be O(N log N). xsltproc has a --profile option that can help identify where the time is spent. Beware, however, that libxslt [and I guess that you're using libxslt, right?] has in the past had bugs in its implementation of this relatively rarely used feature. Phil.