GNOME Bugzilla – Bug 632447
reduce static memory allocated by the registry
Last modified: 2010-12-03 08:29:34 UTC
Created attachment 172598 [details] [review] use g_intern_string for static caps The registry objects statically allocate quite some memory. There are two big consumers of memory: 1.) the registry-object instance (GstPluginFeature, ...) 2.) the strings (names, klasses, descriptions, ...) On 2.) we already use g_intern_string for a few of them. 1.) could be solved in 0.11 by e.g considering GstMiniObject. The attached patch uses g_intern_string also for static caps. This lowers the allocated memory on my system from 1683kb to 1233kb.
On 1.) we're adding GstPlugin and GstPluginFeature instances to the registry. Neither of them has Properties nor Signals. I'll prototype this.
Created attachment 172825 [details] memory usage callgraph before
Created attachment 172826 [details] memory usage callgraph after "g_intern_String for caps" patch
Created attachment 172827 [details] script to do the meassurements
Just to support the patch: gstelementfactory.c:272: newt->static_caps.string = g_intern_string (caps_string);
(ignore comment 5 - that is part of the patch).
Created attachment 172828 [details] [review] use g_intern_string for interface names