Duncan Alexander <Duncan.Alexander@vcint.com> wrote:
>I know this question has been asked before but I failed to find a
>'definitive' answer.
>
>Does Xalan cache compiled XSLT pages and if it does not....does it store
>the
>uncompiled XSLT page in memory?
I don't know, but I do know that Cocoon caches XSLT - even if you try to
turn caching off in cocoon.properties or by setting the request parameter
cache=false. This is because it bypasses the Cache object and goes straight
to the Store.
I know, the design of Cocoon 1 cacheing isn't perfect!
>The reason I ask is that when using memory profiling tools I can see a
>significant number of new DOM related objects being
>held in memory when making Cocoon requests (with cocoon cache switched
>off).
>When forcing refreshes
>of the relevant pages those objects do not get recreated. The only thing I
>can assume is that Xalan is
>performing some kind of caching.
Cocoon is, certainly. In theory there is a Store cleanup thread, and a
backup OutOfMemoryError handler which will try to rescue the situation if
that fails, to prevent out of memory errors. However we have had
intermittent OutOfMemoryErrors until I reprogrammed MemoryStore to use a
JDK1.2 WeakHashMap instead, and disabled auto-reloading for most of our
in-house classes (this auto-reload feature is not even present in cocoon
yet, but it will be - with a warning in the documentation about memory
consumption!) For example if an OutOfMemory error occurs outside Cocoon,
Cocoon cannot come to the rescue (at least, temporarily).
Cocoon 2 will be much more resilient in terms of memory usage because it
will use a WeakHashMap or something like it for caching.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
|