Database in a simple ascii file
Lucio Torre
lucio at movilogic.com
Fri Nov 30 15:15:23 EST 2001
More information about the Python-list mailing list
Fri Nov 30 15:15:23 EST 2001
- Previous message (by thread): Database in a simple ascii file
- Next message (by thread): Database in a simple ascii file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steve Holden wrote: >"Rafael Mentz Aquino" <pythonlist at zumnet.com.br> wrote ... > >>Hi, >> >>How many lines can I have in a simple ascii file before >>I start to loose performance when I open this file and >>put all the lines in a dict, turning the first column into the key >>and the rest of the line into a list associated to that key. >> >>(my file has just 100 lines, but that question starts to bother me ;-) >> >You couls always do some testing ... > >In fact this is probably the fastest way to do it, for random keys and a >file that will fit comfortably into memory. The dictionary implementation >works hard to make sure that access time is roughly constant no matter what >the size. > >Posters have in the past reported using dictionaries of 100,000 elements >without problems, so your file has to grow some before you hit uncharted >territory... > >regards > Steve >-- >http://www.holdenweb.com/ > I think that ZODB will allow you to have a dictionary bigger than your memory. Is that so? Anyone tried it?
- Previous message (by thread): Database in a simple ascii file
- Next message (by thread): Database in a simple ascii file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list