[Kde-pim] [PATCH] Increase responsiveness of PIM apps
Tobias König
tobias.koenig at kdab.com
Fri Dec 31 07:37:26 GMT 2010
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?
Ciao,
Tobias
--
Tobias Koenig | tobias.koenig at kdab.com
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etm.patch
Type: text/x-patch
Size: 2812 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20101231/365a97f9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3636 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20101231/365a97f9/attachment-0001.bin>
-------------- next part --------------
_______________________________________________
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