Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Scanner eats up memory #7638

Closed
mixxxbot opened this issue Aug 22, 2022 · 2 comments
Closed

Library Scanner eats up memory #7638

mixxxbot opened this issue Aug 22, 2022 · 2 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: kain88-de
Date: 2014-11-10T14:26:12Z
Status: Fix Released
Importance: Critical
Launchpad Issue: lp1391178
Tags: library


I noticed today that mixxx uses a large amount of memory while scanning for files (more then 5GB on my machine). Once the scanner is done the memory usage drops back to a more reasonable amount. This behavior exists since we merged the cover-art branch.

The reason for this is that the TIO objects now consume a lot more memory because they also store the cover images found while they are parsed and that we use QObject::deleteLater in the library scanner when constructing the TIO objects. Since Qt 4.8 deleteLater in a thread without event loop means that objects are deleted when the threads stops.

http://qt-project.org/doc/qt-4.8/qobject.html#deleteLater

Using a debug statement to check when a TIO is deleted shows that for the libraryscanner they are all deleted once the scanner finishes. Removing from DeleteLater from the TIO construction solves the memory issues for me and I see that the TIO's are deleted during the scan.

To double check my results I remove the CoverArt private variable from TIO and replaced the getter objects to return default classes. This also solves the memory "leak".

My current solution would be to delete the TIO's in the scanner as soon as they are out of scope. I don't know why we use DeleteLater in the scanner anyway. I didn't notice anything not working.

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2014-11-10T14:27:05Z


#377

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 2.0.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant