gst/: Yet another gratuitous GString micro-optimisation: add a (private) function...
authorTim-Philipp Müller <tim@centricular.net>
Wed, 9 Jan 2008 16:36:34 +0000 (16:36 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 9 Jan 2008 16:36:34 +0000 (16:36 +0000)
commitd5d69b94754e63af275e35fc7df48732824dff81
tree2d88bf763f5ebe82f33bd0829dee358ee50bc9bd
parent73808617cfdb7b18a6234ff985a1595dea629639
gst/: Yet another gratuitous GString micro-optimisation: add a (private) function that serialises a structure appendi...

Original commit message from CVS:
* gst/gst_private.h: (STRUCTURE_ESTIMATED_STRING_LEN):
* gst/gstcaps.c: (gst_caps_to_string):
* gst/gststructure.c: (GST_ASCII_IS_STRING),
(priv_gst_structure_append_to_gstring), (gst_structure_to_string):
Yet another gratuitous GString micro-optimisation: add a (private)
function that serialises a structure appending to an existing
GString, so that when we serialise caps we don't need to alloc+free
a throwaway GString for each structure (each of which also entailing
multiple reallocs on the way); also use g_string_sized_new() in
various places with an approximate string length to avoid reallocs
within GString. See #500143.
ChangeLog
gst/gst_private.h
gst/gstcaps.c
gst/gststructure.c