[jsword-devel] JSword GoBible Creator

Stephen Denne spdlist at ihug.co.nz
Tue Jul 14 02:48:52 MST 2009


> > The code I've got isn't particularly quick at the moment 
> (around 80  
> > seconds), since I'm passing each verse through an XSLT
> > transformation.
> 
> The time it takes is not much of an issue. It won't be anywhere near  
> that long on the CrossWire server. We may need to put up a 
> "Please be  
> patient" sign.

I was curious where the time was going, and found one process taking up a huge amount of time for no gain:

TransformingSAXEventProvider.getTemplateInfo() which was being called for every verse, checks the last modified time of the
stylesheet by calling NetUtil.getLastModified(xsluri) to see whether it can use a cached copy.
Changing the last modified time to 0 meant the time went down to 55 seconds.
Could this possibly be changed to a configurable capability?

TransformerFactory.newInstance() is called for every verse.
Inlining that variable to the only place it is used, in getTemplateInfo() when the stylesheet is not in the cache, means it'll get
called only when needed.
The time went down to 34 seconds.

Regards,
Stephen Denne.




More information about the jsword-devel mailing list