After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 545100 - use string pools to lower number of relocations
use string pools to lower number of relocations
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-28 08:29 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2011-05-19 09:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan Sauer (gstreamer, gtkdoc dev) 2008-07-28 08:29:20 UTC
See http://0pointer.de/blog/projects/string-pools.html for code example.

Here we could use it right away and would ave around 50 relocs.
gstreamer/gst$ grep -Hn "gchar \*.*\[\]" *.c
gstinfo.c:646:  static const gchar *levelcolormap[] = {
gstplugin.c:96:static const gchar *valid_licenses[] = {
gstquark.c:28:static const gchar *_quark_strings[] = {

Unfortunately it won't work for gstenumtypes.c.

With some effort (split into separate arrays) more could be saved on:
GstEventQuarks, GstFormatDefinition, GstMessageQuarks, GstFlowQuarks, GstQueryTypeDefinition, GstStructureAbbreviation

One can check the number of relocations
readelf -d .libs/libgstreamer-0.10.so | grep RELCOUNT
which for me right now is '1036'.
Comment 1 Sebastian Dröge (slomo) 2011-05-19 07:55:06 UTC
Is this really worth the effort? Do you plan to work on this?
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2011-05-19 09:20:40 UTC
Won't have time for it right now. Lets close it - there are more worthy place to improve.