Dear Steve,
> (...)
> My first question is about caching and performance, mentioned in a
> different post today. My performance tests were disappointing, running
> 500-something milliseconds on a 25K XML and short XSL file, while someone
> else's Xerces test ran 300-something ms (with caching for the XSL tree but
> not the XML).
Well, we are aware of things that should be optimized in the code; with
some of them, it would not be difficult, and I expect a significant
improvement in performance when that is done. However, it takes some
time, and since Sablotron now runs at "reasonable" speed (at least for
us), I think it's better to try and fill in the missing functionality
first.
> I looked through the code, and it seemed that there was a
> capability to cache or "refrain from forgetting" parse trees within a
> Processor, but SablotProcess always creates new Process objects for each
> execution.
You're right. The idea is that one Processor object corresponds to a
single run of a stylesheet on a document. On the other hand, the cache
would have to be persistent, kind of global within the shared library.
That's one possibility anyway.
> Perhaps I'll play around with making caching work...
Perfect. If you decide to, I am ready to discuss anything you'll need.
> My second question is about extension support. I need to figure out a way
> to get my system of XSL files somehow instantiating objects and making
> method calls for those objects. I don't want to do this with Cocoon-style
> full language embedding, but figured I could do it with a few extra tags
> in the XSL file, if there was support for expanding out XSL variable
> references within the tags. So my question, for those who know the
> architecture better than I, is: How hard would this be? Are there any
> plans for it? Could I hack it in easily?
Ugh. I'm probably getting this wrong. What do you mean by "expanding out
XSL variable references within the tags", something like
<my_tag_$name> expanded as, say, <my_tag_JOE> ?
Could you please give more detail on the way you want to instantiate the
objects from within the stylesheet?
Regards,
Tom Kaiser