[issue23103] Reduce memory usage for ipaddress object instances
Serhiy Storchaka
report at bugs.python.org
Tue Dec 30 09:45:17 CET 2014
Serhiy Storchaka added the comment:
> I believe you need to add a bunch of __slots__ = () to various base classes in the module, even though they lack member variables.
Done. Here is updated patch.
I don't think that IP addresses need weak references more than base types as integers or strings. Caching can be implemented without weak references (some caching already is used for networks), and I afraid that supporting weak references list will spent more memory than saved with caching.
----------
Added file: http://bugs.python.org/file37560/ipaddress_lightweight_2.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23103>
_______________________________________
More information about the Python-bugs-list
mailing list