On 21.09.2005 11:41:43 Manuel Mall wrote: <snip/> > > > Transformer transformer = factory > > > .newTransformer(new StreamSource(xsltfile)); > > > > That's exactly it. You reload the stylesheet every time. If you > > create a stylesheet cache, you can simply reuse Templates instances. > > > Why would cacheing the stylesheet make the first invocation faster?
It doesn't. It just improves overall performance. > The > original question was about executing a transformation multiple times > in a loop and why the first invocation takes so much longer than the > second and by the 3rd execution times becomes stable. I still think > these time differences are solely JVM/application startup/warmup > related and have nothing to do with cacheing the stylesheet as that > would only make subsequent invocations faster. That's correct. But ALi asked for stylesheet caching, so I gave him a tip. I assume he won't be against a generally faster solution. :-) <snip/> Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]