I've been fooling around looking at how much free memory is left after
making SOAP calls, and I think there is a problem in the
DocumentBuilder pool, but I'm not sure what to do about it (or if
anything can or should be done about it).

In a nutshell, I observe that there is some chunk of memory held as
non-collectible until the next RPC.  The held memory correlates with
the size of the previous response payload.  In other words, if you run
RPCs with big responses, the held memory stays large.  As soon as you
run an RPC with a small response, the held memory drops
correspondingly.  (There's probably some cool pattern name for this
effect, but I don't know what it is.)

I *think* what's happening is that something in either the
DocumentBuilder or the unmarshaling code is holding a reference to
something after the call is over.  (I use a new Call object on each
RPC, so all the goop that cascades down from that is collectible.)

This doesn't have much impact in isolated environments, but when you
run a lot of threads or whatever, the longer those threads hold memory
that would otherwise be collectible, the bigger the overall memory
footprint.
-- 
[EMAIL PROTECTED] (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3

Reply via email to