W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

RE: An observation about "live" NodeLists

From: Miles Sabin <msabin@cromwellmedia.co.uk>
Date: Tue, 20 Oct 1998 18:21:41 +0100
Message-ID: <c=US%a=_%p=Cromwell_Media%l=ODIN-981020172141Z-24764@odin.cromwellmedia.co.uk>
To: "'Ray Whitmer'" <ray@imall.com>, "'DOM list'" <www-dom@w3.org>
Ray Whitmer wrote,
> I must have missed something here.  Even with unpredictable 
> Java GC, we are still much better off with weak references
> than without.  I would interpret this as greatly helping
> address the problem.

I guess a lot turns on what you count as 'much better off'.
As far as I can see all you gain is not having to implement
the handle-body pattern ... but I think for anyone able to
implement the DOM reasonably well that ought to be a trivial
exercise.

As it happens, handle-body+finalize is the guts of the
underlying implementation of weak refs in 1.2 as a peek
at the JDK sources will reveal.

The issue about GC unpredicatability is a real one. Suppose
we're doing stuff on the server-side and have a long lived
DOM, which is manipulated via NodeLists many times over an
extended period. Un-GCed NodeLists will accumulate over
time; as they do performance will tail off until they're
reclaimed and finalized (with handle-body), or weak refs do
their thing (in Java 1.2).

OK, that's speculation ... I'd be interested to see some
stats and analysis from someone (Ray?) who's put that sort
of implementation together.

Cheers,


Miles

-- 
Miles Sabin                          Cromwell Media
Internet Systems Architect           5/6 Glenthorne Mews
+44 (0)181 410 2230                  London, W6 0LJ
msabin@cromwellmedia.co.uk           England
Received on Tuesday, 20 October 1998 13:26:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT