Merge lp:~mhr3/unity-lens-music/memory-optimizations into lp:unity-lens-music
Proposed by
Michal Hruby
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Michal Hruby | ||||
Approved revision: | 78 | ||||
Merged at revision: | 77 | ||||
Proposed branch: | lp:~mhr3/unity-lens-music/memory-optimizations | ||||
Merge into: | lp:unity-lens-music | ||||
Diff against target: |
425 lines (+232/-117) 4 files modified
configure.ac (+0/-1) src/Makefile.am (+0/-1) src/rhythmbox-collection.vala (+231/-114) src/track.vala (+1/-1) |
||||
To merge this branch: | bzr merge lp:~mhr3/unity-lens-music/memory-optimizations | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gord Allott (community) | Approve | ||
Review via email: mp+99682@code.launchpad.net |
Commit message
Optimize memory allocation
Description of the change
There were reports from multiple users with huge music collections that the new music lens is using huge amount of memory. After profiling this turned out to be mostly used by the xml parser which was keeping the entire parsed file in memory and since we constructed the song model right after the parsing, this caused fragmentation of memory, so even though the xml parser freed everything after the model was built, the mem usage of the process remained very high.
Replace the xml parser from libxml-2.0 with simple GMarkupParser that is able to process the xml by chunks and therefore doesn't have these kind of problems.
To post a comment you must log in.
Using this branch lowered my memory usage from OVER ONE HUNDRED MEGABYTES to LESS THAN THIRTY. I am also now more attractive, smarter and I have more friends.