On Sat, 2007-06-09 at 13:00 +0300, Philip Van Hoof wrote:
> What I disliked most about Camel's 'imap' code, though, is the fact that
> the sequences have to correspond to the array indexes of the
> CamelFolderSummary. It sounds like it would have been more easy if that
> was a key in a hashtable.

...???

are you serious?

> 
> For example if a message got expunged that had a sequence value in the
> beginning of the folder, it right now more or less means that the entire
> folder has to be re-synchronised. While the majority of the local data
> can be perfectly corrected in stead too.

huh? it doesn't re-fetch anything, it simply removes the item from the
array at the index given in the untagged EXPUNGE notification.

server says:

* 1 EXPUNGE

camel-imap-summary does:

g_ptr_array_remove_index (messages, seqid - 1);

(seqid in this case would be '1', but keep in mind that IMAP seqids
start at 1 while in c, array indexes start at 0)

How would a hash table simplify this? It'd only serve to complicate
things because you'd have to re-key the entire hash table after each
EXPUNGE notification. Not to mention it would consume a fair bit more
memory...

Jeff


_______________________________________________
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers

Reply via email to