From: Sunil S. <sh...@bo...> - 2010-04-30 10:58:19
|
Hi, > >which has the nice bonus property that it doesn't have the conditional > >which goes one way during the first iteration and the other way during > >all that follow inside the loop (the idea isn't mine, I originally > >learnt about it because of some years-old USENET posting of a guy > >whose name I've unfortunately forgotten). I am also rather concerned > >about use of bandwidth than speed. Presently, I am dealing with 76 > >POP3 accounts and about a meg of stored UIDs I'd need to download > >every five minutes in order to determine that presently, nothing needs > >to be downloaded (this refers to fastuidl in general, assuming I > >understood the principle correctly without really analyzing the code). > > Makes sense, although I'm wondering if it really makes that much of > a difference for fastuidl. > fastuidl appears to be opportunistically harvesting message numbers, > I wonder if that's of any use. > I think Sunil wrote that fastUIDL code, I'm Cc:ing him. The whole idea of the fastuidl code (and the unrelated fetchsizelimit code) is to get the first mail fast. Previously, fetchmail would get all the UIDs and sizes right at the start of the transaction. POP3> STAT POP3< +OK 10000 ... POP3> UIDL (gets 10000 uids) (10000 is the first unseen) POP3> LIST (gets 10000 sizes) With fastuidl and the delayed size information, the fetching of the first mail is faster. POP3> STAT POP3< +OK 10000 ... POP3> UIDL 5000 POP3> UIDL 7500 ... POP3> UIDL 10000 (10000 is the first unseen) POP3> LIST 10000 These changes were done after observing that fetchmail had trouble downloading even one mail over a slow connection, was effectively going into an infinite loop, and was causing the associated wastage in bandwidth. Matthias, you have said that the regular uidl code is faster than the fastuidl code for 10000 uids. Do you mean 10000 uids in the .fetchids file or 10000 uids (i.e. 10000 mails) on the server? The fastuidl code is expected to be faster if there are very few new mails on the server and fetchmail is running with the keep option on. As in the above case, there are 10000 mails, but only one new mail. Please also compare how fast the *first* new mail is delivered with and without fastuidl. Of course, to stop the use of fastuidl, you may add 'fastuidl 0' to the fetchmailrc file. -- Sunil Shetye. |