Bug 189850

Summary: amarok: excessive memory usage
Product: [Applications] amarok Reporter: missive
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: piotrek.juzwiak
Priority: NOR    
Version: 2.1-SVN   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Before updating jamendo
After updating jamendo

Description missive 2009-04-17 03:21:52 UTC
Version:           2.1-SVN (using 4.2.68 (KDE 4.2.68 (KDE 4.3 >= 20090327)), compiled sources)
Compiler:          gcc
OS:                Linux (i686) release 2.6.27-7-generic

When just starting up, amarok is using over 500MB of memory.

After a while, it creeps up to nearly a gigabyte.
Comment 1 Seb Ruiz 2009-04-17 03:33:05 UTC
Missive, this is a useless report. We can't do anything with it, so you'll need to provide much more information:

* How many tracks in the collection (what filesystem)
* How many tracks in the playlist
* Services running and connected to
* Connections to any non local collections (ipods, daap etc)
* Anything else relevant

What would be most useful is a valgrind log
Comment 2 missive 2009-04-17 22:41:46 UTC
* How many tracks in the collection 
3198

* (what filesystem)
ext3

* How many tracks in the playlist
<20 (usually on random, but even with just
     a few tracks in the playlist) 

* Services running and connected to
There are a lot of things listed under the "Internet"
tab, but I have never used them.

* Connections to any non local collections (ipods, daap etc)
None.

* Anything else relevant
Compiled r953442 from svn.
Started with an empty .kde/share/apps/amarok
Started with no .kde/share/config/amarok*
Amarok is using 349M (106M resident)

Imported collection (3198 ogg tracks)
Amarok is using 373M (115M resident)

What would be most useful is a valgrind log
Ok. I've never used valgrind, but I will give
it a go.
Comment 3 Mark Kretschmann 2009-04-17 23:11:29 UTC
@Missive: 115 MB RES memory isn't all that much, if you keep in mind that KDE applications share a lot of memory (through libraries). To calculate the real memory usage you would have to subtract this shared memory, which isn't quite trivial.

At any rate, we're taking memory usage and memory leaks seriously. E.g. today we have fixed a number of memory leaks, with the help of the Valgrind debugging tool. We will continue going this path, trying to cut down on these problems.
Comment 4 Piotr 2009-05-17 23:16:28 UTC
Amarok gains in weight from healthy ~60MB to more than 500MB when updating the jamendo database.
Comment 5 Dan Meltzer 2009-05-17 23:21:26 UTC
*** Bug 193059 has been marked as a duplicate of this bug. ***
Comment 6 Piotr 2009-05-17 23:32:22 UTC
Created attachment 33778 [details]
Before updating jamendo

Before updating jamendo (while amarok was downloading the database)
Comment 7 Piotr 2009-05-17 23:33:21 UTC
Created attachment 33779 [details]
After updating jamendo

Just after downloading whole jamendo database.
Comment 8 Dan Meltzer 2009-05-17 23:56:16 UTC
1) The jamendo database is gigantic.  It will use more memory to parse it, this
is to be expected.

2) It should use much less memory in current svn (after beta2.)  I rewrote the
parser two days ago to make it behave better.
Comment 9 Piotr 2009-05-18 00:15:54 UTC
Yes, it may be the case that jamendo database is gigantic but after updating jamendo database and restarting amarok situation is back to normal. No delete after allocating memory for jamendo?
Comment 10 Myriam Schweingruber 2009-07-30 18:13:44 UTC
Solved in current 2.2-git build.