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

Memory leak ? #45

Closed
fpom opened this issue Feb 13, 2019 · 6 comments
Closed

Memory leak ? #45

fpom opened this issue Feb 13, 2019 · 6 comments

Comments

@fpom
Copy link

fpom commented Feb 13, 2019

I'm using acoustid.fingerprint_file() repeatedly on a collection of MP3 files, and I see the memory usage of my script growing over and over despite the fact I store the obtained fingerprints in a DBM. (I've done the same with SHA512 hashes and I observed no such increasing memory usage).

So I strongly suspect a memory leak in the library.

I've installed 1.1.5 with pip, using Python 3.6.2 under Linux.

@sampsyo
Copy link
Member

sampsyo commented Feb 13, 2019

Hi! Any chance you’re using GStreamer? If so, we may have just fixed the problem in audioread: beetbox/audioread#84

@fpom
Copy link
Author

fpom commented Feb 13, 2019

I have no idea whether I'm using GStreamer or not. How can I check? I just do: import acoustid then acoustid.fingerprint_file(somepath).

BTW, I've replaced acoustid.fingerprint_file() with subprocess.check_output(["fpcalc", ...]) and it's much faster, which surprised me.

@sampsyo
Copy link
Member

sampsyo commented Feb 13, 2019

It's actually pretty hard to tell—you can check whether you have GStreamer and the appropriate Python bindings installed, and then it's likely that's what's happening.

@fpom
Copy link
Author

fpom commented Feb 14, 2019

I'm not sure but I think is is installed: the following does not fail

import gsi
gsi.require_version('Gst', '1.0') 
from gi.repository import Gst

So, since beetbox/audioread#84 has been fixed, my understanding is that the memory leak I've observed will be fixed in the next release?

@sampsyo
Copy link
Member

sampsyo commented Feb 14, 2019

Yep!

@fpom
Copy link
Author

fpom commented Feb 19, 2019

Nice ! :)
Thanks for your help.

@fpom fpom closed this as completed Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants