[jsword-devel] VersificationToKJVMapper RocketPassage use
DM Smith
dmsmith at crosswire.org
Sat Feb 8 08:49:41 MST 2014
If you make the pull request, I have the time to apply it. Or I can make the change.
-- DM
On Feb 8, 2014, at 9:08 AM, Martin Denham <mjdenham at gmail.com> wrote:
> You would only notice it on very low memory devices - it is not a memory leak, just an extra memory requirement. Switching all RocketPassage references to the default passage type, which for me is RangedPassage seems to have worked. I will check it in later.
>
> Thanks
> Martin
>
>
> On 6 February 2014 23:26, Chris Burrell <chris at burrell.me.uk> wrote:
> No reason. This could be changed to use the factory or some lighter implementation.
>
> Haven't seen the oom myself and Ben running it for 9 months now. But doesn't mean it doesn't exist
>
> Chris
>
> On 6 Feb 2014 22:36, "Martin Denham" <mjdenham at gmail.com> wrote:
> When I switched to using RangedPassage instead of RocketPassage by default it improved memory usage but there are 8 specific uses of RocketPassage in VersificationToKJVMapper.
> E.g.
> 303: matchingVerses = new RocketPassage(this.nonKjv);
> 409: newKey = new RocketPassage(versification);
> 503: return new QualifiedKey(new RocketPassage(target));
> Etc.
>
> Is there any reason why any of the 8 specific references to RocketPassage in VersificationToKJVMapper should not use the default passage class returned by PassageKeyFactory.createEmptyKeyList()? I could imagine that if any of the Passages would be likely to contain a large number of verses then a RocketPassage would be better, but I don't think any will. However, I don't have enough familiarity with the code to be sure.
>
> I am actually getting an OutOfMemoryError occasionally when testing on a virtual device caused by the occurrence on line 303 and possibly elsewhere.
>
> Martin
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20140208/2e726b00/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20140208/2e726b00/attachment.p7s>
More information about the jsword-devel
mailing list