Re: [opening and closing mailboxes]



Hi Mike,

On Sat, 19 Feb 2000, Mikael Hermansson wrote:

> I just browse the sources of balsa and it looks like balsa needs a heavy 
> cleanup.
> 
> For example in the main-window.c there is an hidden notebook 
> (gtk_notebook_show_tabs(FALSE)).
> I thought Notebook crap was removed before :-/
> 
> I don't see any reason to have multiple mailboxes open at the same time.
> Why is this???
> 

There are a couple of reasons for this -- one, of course, is that much of
the 'infrastructure' is designed to use notebook pages, and the current
system was easier than re-writing all of the related code.

The second, and more compelling, reason is that large mailboxes (or IMAP)
could take longer to open and close on every switch of the mailbox;  This
is especially true when many messages are being transferred back and forth
and/or deleted.  The file on the disk isn't 'really' synced until the
mailbox is closed, so handling the changes once on close is more
efficient.  (One my system, and I suspect on most systems w/ UDMA, fast
cpus, low loads, etc., opening and closing mailboxes isn't too
distracting, but in other circumstances it might be, and if someone flips
back and forth between 4 mailboxes 25 times in 4 minutes it seems silly to
keep opening and closing them...)

Think of it as a cache of sorts.

The current solution has a callback set to a several minute timer, and
each mailbox has a timestamp of when it was last viewed.  If it hasn't
been viewed in 10 minutes it's closed in the background.

If the popular opinion is that this should change we can always take it
out.




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