Finding messages in huge mboxes
Diez B. Roggisch
deets_noospaam at web.de
Mon Feb 2 16:01:08 EST 2004
> Anyone who has a better idea?
AFAIK MUAs usually use a mbox.index-file for faster access. The index is
computed once, and updated whenever a new message is added. You could
create this index quite easily yourself by looping over the mbox and
pickling a list of tell'ed positions. If you also store the creation-date
of the index and the filesize of the mbox-file, you should be able to
create a function that will update the index whenever the underlying mbox
has changed. Another approach would be to perform index-creation on regular
bases using cron.
Regards,
Diez
More information about the Python-list
mailing list