RE: mmap() for the summary file

<[email protected]>
Newsgroups gmane.comp.gnome.evolution.devel
Message-ID <858F19DFB72E464A924EB138DBF3E325252FE4__11860.1104979918$1150137802$gmane$org@esebe199.NOE.Nokia.com>
Hi Philip and others, 

>-----Original Message-----
>From: [email protected] 
>[mailto:[email protected]] On Behalf Of ext 
>Philip Van Hoof
>Sent: Sunday, June 11, 2006 16:56
>To: evolution-hackers
>Subject: [Evolution-hackers] mmap() for the summary file

>I've been trying to replace the fread()/fopen() implementation 
>in camel-folder-summary.c with an mmap() one.
>
>I know camel-file-utils.c will put duplicate strings in a 
>hashtable and that way reduce memory usage for the summary 
>information. Because a lot mail boxes have duplicate strings 
>for the From and To headers. I know why and how this is 
>implemented. And I understand that this already reduces memory 
>usage a lot.

Hmmmm... I am not really convinced yet; I mean even when I have
100 mails with the same email address in my Inbox (which seems 
a lot from one person!). The email-address would be 20 chars; now having
'm all in one string saves me, even in this extreme case, only
about 2Kb, event forgetting about the overhead of the hash tables etc.

>However. On a small device with few memory resources, the 
>kernel knows better when to allocate and when to deallocate 
>uncachable data like this summary information.
>
>Therefore I propose to replace the implementation with mmap(). 
>Not only I propose it, I also already tried it myself.

[ string proposal ]

Sounds good :-) 

>But anyway ;)

What about having an camel-session at GUADEC, to see what people's
ideas are etc.; recently, it seems more and more people are using
camel directly (without evo), it would be good to sit down and
see how we can streamline this stuff.

Best wishes,
Dirk.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.