Neil Bacon <[EMAIL PROTECTED]> wrote on 08/29/2006 02:45:15 AM:

<snip/>

> > From a quick perusal these DTDs (including the external entities they 
> > reference) look very large. It's not just the entity declarations. 
Just 
> > about everything in these DTDs which match the Name production from 
the 
> > XML spec gets added to the SymbolTable. I assume each document you 
parse 
> > only references one of them. Perhaps it's the sum of the unique names 
from 
> > each of the DTDs which leads to your app running out of memory
> Yes they are quite large, however I still think there is a problem 
because:
> 
> 1) even when using "java -Xmx7000M" (thats 7 salesman's gigabytes) it 
> falls over (whereas 300Mb is enough if I use a new parser for each doc);
> 
> 2) profiling shows that symbol table entries exist with a continuously 
> growing number of different garbage collection generations (new entries 
> are continuously being added without the old ones being cleaned up). If 
> the cache was working new entries would not be created once each DTD had 

> been read once.

I still think more unique names than you're counting are being pumped into 
the SymbolTable. The workaround I mentioned in the other thread avoids the 
issue with unbounded symbol table growth. You could even write an 
extension to the SymbolTable which is memory sensitive (i.e. uses 
SoftReferences) and register it in place of the default SymbolTable.

> Is it possible that I'm messing things up by having xercesImpl-2.8.0 in 
> the classpath without pointing to it with -Djava.*endorsed*.*dirs?

If org.apache.xerces.* classes aren't included in the JRE you're using you 
don't need to use java.endorsed.dirs (but you should probably be using it 
for the xml-apis.jar).

> Cheers,
>    Neil.
> *
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to