too much memory use

Tim Roberts timr at probo.com
Thu May 24 02:56:45 EDT 2007


rohit <rohitsethidce at gmail.com> wrote:
>
>i am making a program for desktop search.
>in order to make it more effective im implementing the records in the
>form of a tree(files starting with 'a','b','c'....have different
>trees ..so 26 trees in all) in memory and writing it down in file.
>the max size file has 16000 records...now to implement the tree in
>list i'm using line no as index ..and empty child nodes are
>represented as "\n"
>all this work is going on in the memory..
>problem is the system eats up my 512 mb RAM +1gb virtual store n hangs
>cant think of an effective way to implement tree in memory(i can
>compact it on disk by writing just the index no..along with the record
>from which tree in memory can be reconstructed, but i have to
>implement tree as previous to implement random access)

Why don't you just use a database?  That's what they're designed for.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list