On Mon 31 Aug 2009 at 02:33PM, Dan Price wrote:
> On Sat 29 Aug 2009 at 08:36AM, Danek Duvall wrote:
> > Dan Price wrote:
> >
> > > http://cr.opensolaris.org/~dp/pkg-mem/
> >
> > Nice. Very simple.
> >
> > I'm a bit confused about the protocol between __new__() and __init__().
> > >From the datamodel doc page, __init__() is called if __new__() returns an
> > instance of the class. Which you do, so that's presumably when the
> > "dotstring" argument to __new__() is used. But since you're protecting
> > yourself against a second call, where does that second call come from?
I have posted an updated webrev. Since I will be gone for a few
weeks, Danek has agreed to take this over, if he has time to do so.
We did some testing and Shawn is still seeing this wad as a memory
win with his new catalog work, although the win is smaller. Also, it
might help with the GUI's memory usage.
We do think that WeakValueDictionary will work for threaded clients;
an open question is whether the "weakness" is worth it-- it might
be better for performance to do a straight up dictionary (or to keep
this cache attached to some higher level object like 'API') so
that versions don't get discarded. More digging needed.
-dp
--
Daniel Price, Solaris Kernel Engineering http://blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss