[Bug 41514] KMail freezes the UI when checking for new mail

A T Somers andre at familiesomers.nl
Thu Sep 28 08:04:56 UTC 2006


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=41514         




------- Additional Comments From andre familiesomers nl  2006-09-28 10:04 -------
Quoting Maciej Pilichowski <bluedzins wp pl>:

> I am not talking here about fully operational multi-threaded
> processing but just refreshing the windows -- so the window won't be
> blank all of the sudden. I don't know how about Qt, but in Delphi it
> would like this:
>  while (am_I_still_processing_data())
>  {
>    process_data();
>    Application.ProcessMessages; // it ensures events are sent and
> window is refreshed
>  }
>
> Currently when I switch to other app and back KMail looks like dead,
> white rectangle, pretty ugly -- it would remedy only this, not
> problems noted in #0. Anyway worth a try.
>

Such a thing is far from trivial in a complex real world application, because
such a message (like the clicking of a button by the user) could trigger a
chain of actions that interfere with the currently running process in complex
ways. ProcessMessages() (yes, it exists in Qt as well) is by no means a magic
bullet here.

I still think that the main mail processing should be in one or more separate
worker thread(s) from the UI. Maybe that will become more easy after KDE4?

André



More information about the pkg-kde-bugs-fwd mailing list