[Biojava-dev] BioJava 1.7.1 SimpleRichObjectBuilder memory issue

Andreas Prlic andreas at sdsc.edu
Wed Dec 8 18:34:32 UTC 2010


Hi Bart,

not sure if you already got a reply on this one, The RichObjectBuilder
interface is now part of the biojava-legacy module. For BioJava3 there
is a new sequence module. If you have time would be great if you could
take a look at that and provide feedback.

Thanks,

Andreas



On Mon, Dec 6, 2010 at 3:06 AM, Bart Mesuere <bart.mesuere at ugent.be> wrote:
> Hi,
>
> While reading and digesting 10GB of GenBank files, I noticed the
> SimpleRichObjectBuilder keeps a reference to every Object it created.
> I know this is done to preserve the singleton property of the objects
> but it wastes a lot of memory.
> Shouldn't it be better to keep these references in a weak valued HashMap?
> That way when no other references to the object exists, the object
> (and key) can be collected by the garbage collector.
> I wrote a basic implementation of such a RichObjectBuilder and it
> seems to work fine.
> I was wondering if I overlooked something because I would be happy to
> contribute the code (if this is still an issue in the upcoming
> BioJava3 release).
>
> Kind regards,
> Bart
>
> --
> Bart Mesuere
> Department of Applied Mathematics and Computer Science
> Ghent University
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>



-- 
-----------------------------------------------------------------------
Dr. Andreas Prlic
Senior Scientist, RCSB PDB Protein Data Bank
University of California, San Diego
(+1) 858.246.0526
-----------------------------------------------------------------------



More information about the biojava-dev mailing list