[M-Dev] Re: Here's the POP3 loop
Status: Beta
Brought to you by:
vadz
From: Karsten B. <bal...@gm...> - 2000-12-30 15:08:34
|
Greg, I've tried to follow through your mail describing the POP3 problem and I think there are some things wrong with your analysis. I'll try to work through it and write down here what I think. First, CountMessages() gets called three times in UpdateTitleAndStatusBars(), not once for the title and once for the frame as you wrote, but once each to get the total, recent and new messages counts. Perfectly fine as it only triggers a rebuilding of the listing *if needed*. I.e. GetHeaders() should only rebuild the list if needed, so it is called liberally all over the place (like in CountMessages()). Notice that ProcessEventQueue() and especially GetHeaders() never *queue* an event. So calling GetHeaders() which calls ProcessEventQueue() does not create new update events. The only time events get queued are really in these few places: UpdateStatus() if the number of messages changes (called from GetHeaders() but here it shouldn't change after the first call) RequestUpdate() called from various places, such as the expunge function and various callbacks. While looking for that I just found a bug in UpdateStatus() that caused it to send an event *each* time not just when the message number changed. I am sure I had fixed this before, so I'll reapply this fix and commit it straightaway. That might have well been the cause of the problem. Please try it again. More helpful than looking at where GetHeaders() is called would be a breakpoint on MailFolderCC::QueueEvent() so you can see where the event is queued which causes GetHeaders() to continuously rebuild the list. Though, this might also be caused by RequestUpdate(). Hope this helps! -- Karsten Ballueder <http://Ballueder.home.dhs.org> |