[gstreamer-bugs] [Bug 161991] New: gst_init is slow
bugzilla-daemon at bugzilla.gnome.org
bugzilla-daemon at bugzilla.gnome.org
Wed Dec 22 07:27:46 PST 2004
http://bugzilla.gnome.org/show_bug.cgi?id=161991
GStreamer | gstreamer (core) | Ver: HEAD CVS
Summary: gst_init is slow
Product: GStreamer
Version: HEAD CVS
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Low
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: rbultje at ronald.bitfreak.net
QAContact: gstreamer-bugs at lists.sourceforge.net
$ ./speed
Time: 0:00:02.775234000
$ cat speed.c
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <sys/time.h>
#include <gst/gst.h>
gint
main (gint argc,
gchar *argv[])
{
struct timeval t1, t2;
/* init */
gettimeofday (&t1, NULL);
gst_init (&argc, &argv);
gettimeofday (&t2, NULL);
g_print ("Time: %" GST_TIME_FORMAT "\n",
GST_TIME_ARGS ((((gint64) t2.tv_sec * 1000000 + t2.tv_usec) -
((gint64) t1.tv_sec * 1000000 + t1.tv_usec)) *
1000));
return 0;
}
$
That is very painful. More than 2,5s for gst_init()... Thank god, we have
callgrind. ~34% is spent in init_pre() and ~66% in init_post(). Pretty much all
of this is registry parsing. Something tells me this is due to caps parsing.
Here's what happens if I change the caps of ffmpeg's raw video pad templates to
a simpler form (see attached patch):
$ ./speed
Time: 0:00:01.747114000
Now imagine the rest yourself... Can this be made faster?
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.
More information about the Gstreamer-bugs
mailing list