[Kde-pim] Re: [PATCH] Increase responsiveness of PIM apps

Torgny Nyblom kde at nyblom.org
Fri Dec 31 08:42:17 GMT 2010


On Friday 31 December 2010 08.37.26 Tobias König wrote:
> Hej,
> 
> the attached patch changes the behavior of EntityTreeModel in LazyPopulation
> mode, which is used for nearly all PIM applications currently.
> The current behavior of the ETM is to connect against the
> ItemFetchJob::itemsRetrieved() signal and inserting the new rows immediately
> into the model. For larger folders this will cause multiple rowsInserted()
> signals to be emitted, which results in multiple resets of the above proxy
> models and time consuming updates in the views.
> 
> This patch changes ETM to wait until the ItemFetchJob has finished and
> inserting all items into the model in one go.
> While this will stall the point in time when the first item is visible in
> the view, the view is immediately responsive once the items have been
> populated.
> 
> Loading a local folder with 1400 messages in kmail-mobile with the 'old' ETM
> will show the first messages after ~2 seconds but the listview can't be
> used (e.g. scrolled or clicked on an item), because there are consecutive
> rowsInserted() signals emitted from the model which causes to reset the
> proxy models and the view ~20 times. So the listview can't be used for the
> next 20 seconds (setup: single core CPU with 1500 MHz).
> 
> Using the 'new' ETM, the first messages are shown after ~3 seconds (just a
> feeling, difficult to measure exactly), but then the listview is responsive
> immediately and can be scrolled right now.
> 
> So the question is whether the initial delay (until the first message is
> shown) can become too large to draw the advantages of the reduced
> rowsInserted() signals void. Can somebody with large online IMAP folders
> check how this patch works for him?

A big thanks for looking into this!

A thought on big folders: How would it work if the ETM would insert the first 
X messages into the model and then queue the rest? This would make the folder 
be populated with the X most resent messages and hopefully somewhat usefull 
message list untill the whole collection is available.

/Regards
Torgny
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list