GNOME Bugzilla – Bug 397621
io-png.c: Don't load iconv for ASCII text chunks
Last modified: 2010-07-10 04:04:15 UTC
Attached patch optimizes away g_convert() calls when the text in question is pure ASCII.
Created attachment 80504 [details] [review] Patch implementing the above (taken from maemo-gtk) The patch also adds a missing g_set_error() in another function, I was too lazy to make a separate patch for that.
Looks fine. Will this really avoid loading iconv for the startup of a typical application though ? I'm sure there are other places...
It probably doesn't avoid loading iconv for a "typical" app, but it doesn't hurt to optimize it away. With the old code *any* tiny program that loads a PNG would pull in iconv.
Fixed in trunk and 2-10: 2007-01-17 Michael Natterer <mitch@imendio.com> Patch taken from maemo-gtk: * io-png.c (png_text_to_pixbuf_option): don't call g_convert() on ASCII strings. (png_info_callback): set an error when the size_func would scale the pixbuf away completely.
(In reply to comment #2) > Looks fine. Will this really avoid loading iconv for the startup of a typical > application though ? I'm sure there are other places... For the record, this and not setting legacy ICCCM window manager hints avoids loading iconv on n800 running browser and xterm; grep iconv /proc/*/maps comes up empty.
(In reply to comment #5) > For the record, this and not setting legacy ICCCM window manager hints avoids > loading iconv on n800 running browser and xterm; grep iconv /proc/*/maps comes > up empty. If you are using glibc, that grep will always be empty, since iconv is in glibc. You can grep for gconv.
grep gconv only shows gconv-modules.cache