* Henrik Vendelbo <[EMAIL PROTECTED]> [2003-11-02 13:05]: > ----- Original Message ----- > From: "Alain Javier Guarnieri del Gesu" <[EMAIL PROTECTED]> > To: "Henrik Vendelbo" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Saturday, November 01, 2003 6:03 PM > Subject: Re: Other sticky issues > > > > * Henrik Vendelbo <[EMAIL PROTECTED]> [2003-11-01 16:29]: > > > > > Memory consumption is sticky in my book. It uses a huge amount of > > > memory it seems from my tests. It could be the way I access, but > > > it's fairly straightforward though. > > > > > Create an object through JAXB once. Then persist it to a Xindice > > > collection 1000 times via SAX. That appears to use beyond 1Gb RAM > > > according to java.lang.Runtime. And takes 17 secs. > > > > > Admitiably I do use a unit test that isn't very kind, since every > > > time I run a test I create the collection, get the collection, do > > > the test, and then remove all resources in the collection > > > > I've been reading the code for XQuery. They use WeakHashMaps to > > cache the page hits. If the test runs fast enough, it doesn't seem > > like there would be a need to collect that memory. Or perhaps, their > > is a leak somewhere, meaning, that a pages are read over and over > > again, and never dereferenced.
> I was referring to Xindice. I looked at XMLResourceImpl, and if it > is anything to go by, then the memory consumption is > understandable. There has also been some concern about > collection.close() being a nil implemention (I asume it still is). > The getContentAsSAX gets a new XMLReader for every call relying on > the garbage collector and Xerxes for memory efficiency. That in > itself might be quite a hit to my knowledge. I was refering to Xindice too, typo, sorry. -- Alain Javier Guarnieri del Gesu - [EMAIL PROTECTED]