GNOME Bugzilla – Bug 335480
start with debugging disabled
Last modified: 2006-03-22 18:26:14 UTC
Debugging messages consume way too much CPU when no debugging is enabled. This is due to the fact that the global debugging variable is set to TRUE which makes all debugging statement perform an excessive amount of argument formatting and category checking before throwing away the debug info.
Created attachment 61752 [details] [review] disable debugging by default This patch disables the debugging and only enables it when some debug level is set to a value other than NONE.
Since default core (I think only CVS) sets the default level to ERROR, this patch does not do anything for CVS versions. I'm told we ship with level NONE though.
As Jan suggested, a non ABI change would be to check a global level and compare it do the current debug level of the message.
* gst/gstinfo.c: (gst_debug_set_active), (gst_debug_category_set_threshold): Disable debugging unless explicitly activated. Fixes #335480.