Tomas Klinkovsky wrote:
> I have a DocBook document containing 750 BW JPG photos, 300x450 pixels
> each. When I open this document in XXE (Linux Fedora Core 5, Java 1.5),
> then XXE loads the DocBook file, verifies its validity, and starts
> loading photos. System meters indicate "normal" activity, but after some
> time the situation changes, the CPU load reaches 100% and stays there
> forever.
> 
> My suspect was insufficient memory, even if I would prefer e.g. a
> message box to indicate that, rather than a neverending and
> uninterruptible operation. So I changed the default memory configuration
> from 128MB to 256MB and the same document loads successfully.
> 
> Everything is fine, up to now.
> 
> But when I close this document and open it again, I end up with the 100%
> CPU load and neverending operation again. The same happens when I press
> Ctrl-L on already opened document.
> 
> It's clear to me that not everything in Java is under your control. It's
> also clear that a document containing so many photos is rather
> non-standard. On the other hand, having the document closed, I would
> expect all the image objects released, so the document re-opening should
> succeed again.

We have tried to have Java release memory, at least when all documents
have been closed. We never succeeded in doing this. This may be caused
by the type of garbage-collector used by Java, or more probably, this
may be caused by XXE's own code which is not written to ease the job of
the garbage-collector.

Therefore the solution is simply, one more time, to double the amount of
memory made available to Java (256Mb --> 512Mb).

---
PS: Who cares? It is just 512Mb of *virtual* memory, which is not going
to be used when you'll work on normal documents.



Reply via email to