[jsword-devel] JSword GoBible Creator
Troy A. Griffitts
scribe at crosswire.org
Sat Aug 8 18:55:36 MST 2009
Hey guys. How's the GoBible creator from JSword stuff going?
I have another idea for you, in addition to the website download generator:
How about something we can place on our CD which will generate a GoBible
package from user selected options. We're pretty tight on space on the
CD so I don't want to duplicate the data for every module inside a
GoBible installer, but if we could have an on-demand Generator instead,
that would be really cool. The root of CD is a SWORD library
installations so JSword can grab Bibles from there.
What do ya think?
-Troy.
DM Smith wrote:
> Stephen Denne wrote:
>>>> 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?
>>
> Certainly it can be changed.
>
> I'm really surprised that it is called once for every verse. The pattern
> that BibleDesktop uses is to gather all the requested verses into a
> buffer and call the stylesheet once on it. Is it that each verse is
> indexed and thus built separately in the GoBible module?
>
> There is a lot of other repeated overhead that happens that we have
> considered too small given the expected use pattern.
>> 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.
>>
>
> This too can change.
>
> Would you open a "bug" in Jira (www.crosswire.org/bugs) against JSword?
> Just one for both of these would be fine. If you want to work up a patch
> for it, appending it to the issue, please make yourself the issue owner.
> Otherwise assign it to me.
>
> Many thanks,
> DM Smith
>> Regards,
>> Stephen Denne.
>>
>>
>> _______________________________________________
>> jsword-devel mailing list
>> jsword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/jsword-devel
>>
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
More information about the jsword-devel
mailing list