Tree structure consuming lot of memory
mayank gupta
mooniitk at gmail.com
Mon Jul 6 05:55:26 EDT 2009
Hi,
I am creating a tree data-structure in python; with nodes of the tree
created by a simple class :
class Node :
def __init__(self , .... other attributes):
# initialise the attributes here!!
But the problem is I am working with a huge tree (millions of nodes); and
each node is consuming much more memory than it should. After a little
analysis, I found out that in general it uses about 1.4 kb of memory for
each node!!
I will be grateful if someone could help me optimize the memory usage.
Thanks.
Regards,
Mayank
--
I luv to walk in rain bcoz no one can see me crying
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090706/a066fe29/attachment.html>
More information about the Python-list
mailing list