[Patches] [ python-Patches-1540385 ] tarfile __slots__ addition

SourceForge.net noreply at sourceforge.net
Thu Dec 21 09:51:52 CET 2006


Patches item #1540385, was opened at 2006-08-15 06:47
Message generated for change (Settings changed) made by gustaebel
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1540385&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Brian Harring (ferringb)
>Assigned to: Lars Gustäbel (gustaebel)
Summary: tarfile __slots__ addition

Initial Comment:
Quicky mod, use __slots__ for TarInfo objects in
tarfile module; lot of slots, but reduces memory by
around 33% in testing.

Pardon the delay in submitting; would like to see it in
2.5, but also well aware it's pushing it time wise.

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2006-08-25 00:55

Message:
Logged In: YES 
user_id=357491

I have backwards-compatibility issues with this.  Adding
slots to an already existing object can cause problems if
people are arbitrarily adding attributes to an instance.

----------------------------------------------------------------------

Comment By: Lars Gustäbel (gustaebel)
Date: 2006-08-16 15:28

Message:
Logged In: YES 
user_id=642936

If you had run the test suite you would have noticed that
there are still some names missing: buf, sparse and
_link_target. Please adjust the patch.

I cannot really estimate the implications of this patch. I
think in terms of memory use it is reasonable to add
__slots__ to Tarinfo objects because they can appear in
hordes of thousands sometimes. But it could break some code,
too.

OTOH it is easy to reverse ;-)



----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2006-08-15 08:55

Message:
Logged In: YES 
user_id=21627

It definitely can't get into 2.5.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1540385&group_id=5470


More information about the Patches mailing list