GNOME Bugzilla – Bug 680366
GstDiscoverer slows down when discovering multiple files
Last modified: 2015-09-10 06:41:51 UTC
Created attachment 219375 [details] Simple testcase Starting investigation from https://mail.gnome.org/archives/rygel-list/2012-July/msg00129.html It looks like that 0.10, the repeated use of a GstDiscoverer in a mass-extraction scenario (such as Rygel's metadata harvester) causes the discoverer to slow down quite a lot after some rounds of extraction. See attached example which simulates the extraction of 4.5k mp3 files. After ~1.5k extractions the time for a single extraction is up to ~0.5s from ~0.005 seconds.
Created attachment 219376 [details] Plot of the testprogram's output run on a mp3 file
This also seems to have a bad effect in the async scenario, idle funcs (with default priority) are massively delayed, up to several seconds.
Note: The problem seems to be fixed in Gstreamer 1.0 (as of 0.11.92), i.e. the time for a single extraction doesn't increase there. But the test program is leaking memory.
Also seems to be fixed for 0.10 now.
I gather this is obsolete now?
(In reply to comment #5) > I gather this is obsolete now? I just rebuilt and ran Jens's test program: the behaviour is still as reported for gst-plugins-base 0.10.36: the more gst_discoverer_discover_uri() you do, the slower it gets. It's OK for gst-plugins-base 1.0.4 though, so this may be a purely academic exercise. My original complaint with rygel has been addressed with a workaround there (in the 0.16 series which was still using gstreamer 0.10).
IIRC in comment 4 I tried it with some 0.10 git after 0.10.36 and it was gone as well.
Thanks the updates. I think we're only really interested in whether it's fixed in 1.x or not, but if it's fixed in 0.10 git as well, all the better :) Let's close this bug then, if there's still an issue I'm sure someone will file a new bug soon enough.
While reworking the discovery in rygel unstable I noticed that this weird behavior is still there in 1.x when discoverer fails on a file. It gets really slow afterwards if you keep using it. I will try to reproduce with some sample file and probably file a new bug