Merge lp://qastaging/~mhr3/unity-lens-music/memory-optimizations into lp://qastaging/unity-lens-music

Proposed by Michal Hruby
Status: Merged
Approved by: Michal Hruby
Approved revision: 78
Merged at revision: 77
Proposed branch: lp://qastaging/~mhr3/unity-lens-music/memory-optimizations
Merge into: lp://qastaging/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://qastaging/~mhr3/unity-lens-music/memory-optimizations
Reviewer Review Type Date Requested Status
Gord Allott (community) Approve
Review via email: mp+99682@code.qastaging.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.
Revision history for this message
Ted Gould (ted) wrote :

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.

Revision history for this message
Gord Allott (gordallott) wrote :

clever ;) +1

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: