[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: kmail and IMAP and startup (was imap performance issues)
From:       Michael =?iso-8859-1?q?H=E4ckel?= <Michael () Haeckel ! Net>
Date:       2001-04-22 7:38:12
[Download RAW message or body]

On Sunday, 22. April 2001 00:18, Walter F.J. Mueller wrote:
> I updated today to the current KDE CVS snapshot and tried again kmail
> against an IMAP server over a V.90 modem.
>
> 1. Observations:
>
>    * After startup kmail inquires the list of toplevel folders. They appear
>      quickly in the tree view window. All folders have initially
>      (+-) decoration in front.
>
>    * kmail continues to IMAP4::listDir all folders, obviously to determine
>      whether there are subfolders. For each processed folder the
>      (+-) decoration disappears when there are no subfolders.

This problem only appears if the server does not tell anything about the 
properties of the folders when listing them. I also realised that with one 
server. However at least with UW-IMAP and Courier-IMAP that does not appear, 
since they also tell the client if folders contain subfolders, when listing 
their names.

>      This scan of all folders takes quite some time, at least for me. There
>      is no feedback (e.g. in status bar) as to when this scan has finished.

Yes, there is a bug, that the progress is not displayed, when this happens 
automatically on startup without manually opening the imap tree.

>    * If one clicks on folders in the tree view during this scan of all
>      folders one gets the following behaviour (diagnosed with log messages
>      and tcpdump):
>
>        -  first click on a folder -> no effect, scan continues
>        -  second click -> scan stops
>        -  third click -> message headers of this folder are loaded.

That is, because the commands are queued. However a click on a second folder 
stops listing the contents of a first folder and in this case also stops 
listing the folder because of that.

> 2. Suggestions:
>
>    * It should be sufficient to inquire about the toplevel folder when
>      kmail starts. This is enough to setup the folder tree browser. Even
>      though this usually completes quickly (even over a modem), it be
> helpful to have some sort of feedback, e.g. via the status bar.

We had this behaviour before, but I changed it, because then KMail also 
internally only has information about these folders.

>    * It seems sufficient to determine the context of a folder when it is
>      opened. At this point the subfolders as well as the current message
> ID's must be inquired. This allows to update the folder tree view in case
> subfolders are discovered (or in case they disappear!). It be helpful to
> signal this phase also in the status bar, e.g. with a message like
> 'checking folder xyz'.

At least on my server listing the folders and the subfolders is quite fast 
because of the above mentioned reason and therefore not everywhere a problem. 
Also removing the [+] signs again is only a quick hack I inserted two days 
ago until I have a better idea how to solve that problem.

I only could work around this by calling
LIST "" "*"
which list all folders.
instead of recursively calling
LIST "" "%"
which only lists the top level folders.

Then only a single LIST command has to be executed instead of one for every 
folder, but that requires a structural change. It is also possible to use the 
imap slave in Konqueror and there this kind of listing doesn't really make 
sense, since nearly all other protocols don't support it.

Or there is a way to convince the server (I saw that on Cyrus IMAP) to tell 
something more about the folder, than just the name, but I don't know how.

Regards,
Michael Häckel

_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic