<<< Date Index >>>     <<< Thread Index >>>

libmbox: High performance MBOX file format library



Hello,

I developped a MBOX library for Linux (it should work on all POSIX Unix 
systems). The library can read mbox files and extract messages from 
them. I developped the library only with the goal to use it with big 
MBOX files. I talk about 1 Gbyte MBOX files.
My current problem in mutt is for example that it slows down when I open 
my private mbox file with only 2096 messages.

Here a little demonstration with a this file:

saf@julia:~/projects/c/libmbox$ ls -lh test2/big.mbox 
-rw-r--r--  1 saf saf 733M Jan 16 00:21 test2/big.mbox

The mbox file takes 733 Mbytes, but the file is already in the cache of 
the linux kernel because I tried my program already before.

The mbox file has 140 035 messages, I try now to extract the last 
message with my test program:

saf@julia:~/projects/c/libmbox$ time ./get_mail_nb test2/big.mbox 140035
Messages in MBOX file: 140035
Message 140035:
>From 
linux-kernel-owner+mailarch=40xy1.org-S262031AbVANXtD@xxxxxxxxxxxxxxx  
Sat Jan 15 00:51:50 2005
Return-Path: 
<linux-kernel-owner+mailarch=40xy1.org-S262031AbVANXtD@xxxxxxxxxxxxxxx>
X-Original-To: mailarch@xxxxxxx
Delivered-To: mailarch@xxxxxxx
Received: from vger.kernel.org (vger.kernel.org [12.107.209.244])
        by smtp.trashmail.net (Postfix) with ESMTP id C243B33D04
        for <mailarch@xxxxxxx>; Sat, 15 Jan 2005 00:51:49 +0100 (CET)
Received: (majordomo@xxxxxxxxxxxxxxx) by vger.kernel.org via listexpand
        id S262031AbVANXtD (ORCPT <rfc822;mailarch@xxxxxxx>);
.
.
.
.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" 
in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


real    0m2.701s
user    0m2.374s
sys     0m0.229s
saf@julia:~/projects/c/libmbox$  

So 2,7 seconds to read the 733 Mbytes file (already in my RAM cache) and 
to extract the last message. I have a AMD Athlon(tm) XP 2000+ with 
1,5 GB memory of RAM.

Are you interessted by my library to use it with mutt?

Because currently the library is not open source, but if you like I can 
put it in open source, but if nobody is interessted I will not put it 
open source because there is too much work for me to maintain it.
I didn't code other fonctions as like deleting of messages etc.

-- 
saf
http://Archivum.info/ - Administrator