On Tue 24 Jun 2008 at 05:56PM, Shawn Walker wrote:
> 2008/6/24 Dan Price <[EMAIL PROTECTED]>:
> >
> > Folks,
> >
> > Please take a look at the following fix:
> >
> > 2315 disposing of manifests following evalution yields 130MB heap
> > reduction
> >
> > http://cr.opensolaris.org/~dp/ips-mem/
>
> http://cr.opensolaris.org/~dp/ips-mem/raw_files/new/src/modules/actions/legacy.py
> ==========
> 65: tabs instead of spaces
>
> 198 + populate the SVR4 packaging info """
>
> Missing punctuation?
Fixed.
> I don't think it's really that scary, but I'm not certain of the
> benefit here vs. the cost of complexity.
>From the reading I did, __slots__ is considered an "expert" feature of
the language and there are many warnings about using it:
__slots__ is a terrible hack with nasty, hard-to-fathom side effects
that should only be used by programmers at grandmaster and wizard
levels. Unfortunately it has gained an enormous undeserved popularity
amongst the novices and apprentices, who should know better than to
use this magic incantation casually.
- Guido van Rossum
(http://mail.python.org/pipermail/python-dev/2003-August/037542.html)
One thing we'd need to overcome is that __slots__ requires careful
handling if you need pickling support, which Danek says we do, at least
for FMRIs.
>From playing around with slots, I estimate that a conservative
sprinkling of __slots__ declarations could save us about 4MB of
heap, roughly 10% of overall memory, and a larger fraction if you
consider just heap size. So, a win, but not really big game.
-dp
--
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss