[gstreamer-bugs] [Bug 599870] New: [API] micro-optimisation: add GST_DEBUG_FUNCPTR_FULL
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Oct 27 18:52:03 PDT 2009
https://bugzilla.gnome.org/show_bug.cgi?id=599870
GStreamer | gstreamer (core) | git
Summary: [API] micro-optimisation: add GST_DEBUG_FUNCPTR_FULL
Classification: Desktop
Product: GStreamer
Version: git
OS/Version: Linux
Status: UNCONFIRMED
Severity: enhancement
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: t.i.m at zen.co.uk
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME target: ---
GNOME version: ---
Created an attachment (id=146401)
--> (https://bugzilla.gnome.org/attachment.cgi?id=146401)
Add GST_DEBUG_FUNCPTR_FULL() and use it in core
Edward mentioned the other day that GST_DEBUG_FUNCPTR showed up in his list
when benchmarking decodebin2 prerolling, so that got me curious.
Turns out that in the course of playbin2 prerolling to play a video we are
re-registering about 1100 function names/pointers we've already registered.
Almost all of these come from gstpad.c and gstghostpad.c, and every attempt
will incur a hash table lookup protected by a mutex. Not sure if contention was
actually observed or not, but it's conceivable and is likely to be more
noticable in more complex dyanamic pipelines (buzztard etc.?).
Enter GST_DEBUG_FUNCPTR_FULL() which will shortcut the registration based on a
local (static) gboolean.
Admittedly not very elegant, but shortcuts 99% of the re-registration attempts
already, just by using it in gstpad.c and gstghostpad.c.
Not entirely sure if it's worth it at all, absolute numbers are still fairly
small after all, or if there's a nicer way or if it should just be kept
internal, but I thought I'd put it out there for other people to comment on.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list