Re: Patch: use internal folder summary cache always



The very logic of this patch is wrong.

The function camel_folder_summary_prepare_hash and the function
camel_folder_summary_kill_hash must be wrapped around the location where
a lot of UID look-ups are going to be used.

You can't just let it create the hash always, as that will increase
memory usage and force the implementation to always create hash keys
too.

This will make only a few operations faster, but most other operations
will be slower (and will consume more memory too).

Therefor, I reject this patch.

What would be useful is to know at what location the uid look-up takes
place. Perhaps we can wrap that location's loop with the prepare and
kill hash functions in stead?

What calling function appear in your profiler's trace above the uid
look-up in camel-folder-summary.c?

Note that the new summary storage code (mytest7.tar.gz, posted on Thu
this week to Tinymail's mailing list) copes with looking up using both
sequence numbers and uids too.

Also note that if you can look-up by sequence number, that you don't
need to create the hash-table with the current implementation.

So it's better to refactor the offending code to use sequence numbers.
If that's really not possible, you can wrap the code with prepare and
kill - hash.


On Fri, 2007-12-21 at 19:53 +0100, Jose Dapena Paz wrote:
> El vie, 21-12-2007 a las 10:46 +0100, Jose Dapena Paz escribió:
> > 	This patch also includes some changes to make save_append operation
> > work a bit better. Unfortunately, this is not enough as I'm getting
> > heavy corruption (mainly with move to operation in pop folders). Then,
> > it still needs more work, and that's why append is disabled now.
> 
> 	This new patch converts the hash lock into a recursive lock, and then,
> I avoid the silly while hack.
> 
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]