Status reporting (percentage of refreshing summary of folders)



Status reporting when refreshing the summary of folders has been
improved.

It should now in a more stable way report the percentage that is
completed.

It used to restart counting each 1000th header (because each 1000th
header the procedure is repeated, until it's detected that there are not
more headers). This of course caused the percentage status to flip to
zero each 1000th header (making it look like a nervous dog).

The new `technique' attempts to detect the amount of headers to receive,
and counts received header per received header to determine the
percentage that is completed (rather than the amount of headers in this
set of 1000th headers that are to receive).

POP3 has been tested less, but I'm assuming it too is working. The POP3
code does is not split in per-1000 summary items because of its
simplicity (I'm not expecting memory consumption to increase). The POP3
summary receiver, however, dumps the summary info each 1000th header
too.

This, however, does not affect the percentage in POP3's case 

(eh .. bleh, just check the code. You'll see).

It would be much harder to make it possible to display "message n of y
has been received". Not impossible, but harder because the Camel-
Operation API is not suitable for that (I would need to change that
API).

The tinymail API, however, already is. At this moment will the ".. of
total" parameter of the called callback function always be 100 where the
"n" parameter is a percentage per 100.

The TnyCamelSendQueue uses this. For that type the ".. of total" is
exactly the amount of E-mails in the queue, and the "n" parameter is the
nth E-mail that is being sent.


Those are at this moment, I think, the only two status reporting pieces
in the framework (right?).

-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







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