You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Ro...@lotus.com on 2000/03/24 01:25:59 UTC

Re: redirect memory use (was Help!)

I did some timings of your stylesheet with variations on your keeper.xml,
each one with a different number of invoices.  Here is how things scaled:

1 invoice runs in 3 seconds and requires 3.7 MB heap
2 invoices runs in 12 seconds and requires 4.3 MB heap
4 invoices runs in 60 seconds and requires 5.3 MB heap
8 invoices runs in 341 seconds and requires 7.4 MB heap

So, you can see the big problem is that your stylesheet performance is
quadratic in the number of invoices.  The memory use is only linear.  If we
extrapolate to 100 invoices, this would indicate that you would require a
60 MB heap and 16 hours of processing time!

So, the first step is to look carefully at your stylesheet and eliminate
any interactions between your invoices.  Try to eliminate all "//" selects.
Once you get it to the point where each invoice can be processed in
isolation, independent of the others, then you could break up each invoice
into a separate file and process them via the document() function.  This
would then allow you to hold only a single document's data in memory at a
time.  This might allow you to run with as little as a 4MB heap.

-Rob


>Hello Rob,
>thank you very much. These changes reduce the performance of one invoice
>from 20 to 12 minutes. Unfortunately thats not enough for me. Is there a
>possibility to say xalan to print suddenly one invoice, when it is
>parsed
>and then to delete this part from memory??