Indexing yields a performance improvement in some stylesheets, by reducing 
the amount of tree-walking needed to find elements by name. But it does 
have some computational/storage cost, and some stylesheets won't benefit 
from it. As with any optimization, we're playing the odds...

Internally, indexing can be turned on or off when the DTM is requested 
from the DTMManager -- we don't attempt to index RTFs, for example, since 
they're usually small enough (and transient enough) that the cost of 
indexing would outweigh the gain. But I don't think we've exposed any way 
to control that via the user APIs; it appears to be hardcoded in the 
Transformer.transform() call.

If you want to experiment with it and see whether exposing this control 
would be useful, the patch point is in the Transformer.transform() method, 
where it calls 
      DTM dtm = mgr.getDTM(source, false, this, true, true);
Changing that to 
      DTM dtm = mgr.getDTM(source, false, this, true, false);
would turn off indexing.

If that does turn out to be significantly helpful for a significant number 
of stylesheets, we should probably post  an Enhancement request in 
Bugzilla suggesting that a feature be created to control this.

______________________________________
Joe Kesselman  / IBM Research

Reply via email to