Review Request 120455: Avoid a lot of syncs to FavoritesModel in kickoff

David Edmundson david at davidedmundson.co.uk
Wed Oct 1 18:23:37 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120455/
-----------------------------------------------------------

Review request for Plasma.


Repository: plasma-desktop


Description
-------

Avoid a lot of syncs to FavoritesModel in kickoff

Current code loaded the list of favourites into a string. It then
readded them one by one syncing the config after each change.

At the end the config is the same as when we started but with n config writes in
the meantime.

Splitting add and load methods solves this.

This should hopefully fix lockups as we're no longer writing to kickoffrc so often on load as well as give us a significant speed boost on the initial open.

BUG: 339451


Diffs
-----

  applets/kickoff/core/favoritesmodel.h 27a0626 
  applets/kickoff/core/favoritesmodel.cpp f05588b 

Diff: https://git.reviewboard.kde.org/r/120455/diff/


Testing
-------

Put a breakpoint on Kickoff::FavoritesModel::Private::save

checked this wasn't called anymore and favourites still loaded correctly.


Thanks,

David Edmundson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20141001/1c67e5b5/attachment.html>


More information about the Plasma-devel mailing list