Amarok 2 and memory usage

Bram Schoenmakers bramschoenmakers at kde.nl
Fri Feb 20 19:19:39 CET 2009


Hello all,

One of the first things I noticed about Amarok 2.x was its memory usage. So I 
checked out Amarok revision 928096 and ran it through Valgrind's massif. The 
results are at [1] and [2].

First a disclaimer, I'm completely unfamiliar with Amaroks codebase. So what I 
say may be wrong or my suggestions may approach infinite impossibility.

[1] is the result of running Amarok with a clean user and close it immediately 
once it's loaded. What catches my eye is that the Magnatune collection takes a 
considerate amount of memory. Looking at the code in 
CollectionManager::init(), I see that every collection plugin is initialized 
and everything is loaded into memory. Is that necessary? I would suggest that 
collections are loaded on-demand. Because not everyone (no one?) uses Amarok 
solely for listening music from Magnatune.

[2] is a session run where I start Amarok and download the Jamendo database. 
As you can see the memory usage goes sky-high and does not drop afterwards. 
This does not happen when I run Amarok again and the collection is retrieved 
from disk. It only seems to happen when downloading the Jamendo collection.
As you can see I don't have a debug enabled Qt at the moment, but I think the 
results should be clear enough.

[1] http://www.bramschoenmakers.nl/files/amarok.massif.3467.gz
[2] http://www.bramschoenmakers.nl/files/amarok.massif.3605.gz

Kind regards,

-- 
Bram Schoenmakers

What is mind? No matter. What is matter? Never mind.
(Punch, 1855)



More information about the Amarok-devel mailing list