[Users] [PATCH] Optimize remove_numbered_files_not_in_list() complexity from O(n^2) to O(n)

Colin Leroy colin at colino.net
Wed Oct 10 08:51:26 CEST 2012


On 10 October 2012 at 00h08, Michael Rasmussen wrote:

Hi, 

Thanks Igor, I love this kind of patches where minimal changes make
things a whole lot faster. Keep them coming :)

Thanks Michael for the seg fix.

Just one thing:

> +	    if (g_hash_table_lookup(file_no_tbl, numberlist->data)) {
> +		debug_print("removing unwanted file %d from %s\n",
> 			GPOINTER_TO_INT(numberlist->data), dir);

Isn't that reversed? It's supposed to remove files *not* in list. Or am
I still asleep? :)

-- 
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20121010/084a210d/attachment.sig>


More information about the Users mailing list