glib iconv caching
- From: Matthias Clasen <mclasen redhat com>
- To: gtk-devel-list gnome org
- Subject: glib iconv caching
- Date: Mon, 08 Aug 2005 16:42:02 -0400
Today I learned that the way in which GLib caches iconv descriptors for
reuse is not technically correct and does cause incorrect behaviour in
some cases (if you are interested in an example that breaks, check out
test_byte_order() in the convert-test.c which I recently added).
The reason for caching the descriptors in the first place was that
repeatedly opening and closing iconv descriptors was said to have
high overhead on some platforms (namely Solaris).
Since my tests seemed to indicate the caching actually slows GLib
down (probably due to extra locking) when using a modern glibc,
I have disabled the caching when GLib is compiled against a
modern glibc. This behaviour can be overridden with the
--enable-iconv-cache configure option.
I would be interested in hearing from people using GLib with
other C libraries:
- does convert-test fail ?
- does disabling the iconv caching cause performance problems ?
Thanks,
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]