Revision 00ea111...

Go back to digest for 26th May 2013

Optimization in Multimedia

Matěj Laitl committed changes in [amarok] /:

Optimize and simplify Playlist::Model::removeTracksCommand()

We don't need to keep track of multiple command lists when removing,
just sort rows to remove first and then keep track of how many rows
have been already removed and subtract it at appropriate places.

The optimization is finding consecutive runs of rows to remove and then
grouping begin/endRemoveRows() for them, which was the main CPU hog as
it updates above models and view.

Removing 24.658 tracks from 24.660-track-long playlist now takes about
half a second, which is hopefully acceptable.

Also note that even greater optimization was done by Ralf Engels
earlier after 2.7, commit 861143c02dc1a1, where he cleverly used
references where appropriate, and much more.

@Patrick, please retest with Amarok git master, it should be much
better.


FIXED-IN: 2.8
CCMAIL: Ralf Engels
DIGEST: Optimization: removing tens of thousands of tracks from Amarok
playlist is now much faster.

File Changes

Modified 2 files
  •   ChangeLog
  •   src/playlist/PlaylistModel.cpp
2 files changed in total