Am 06.09.2011 um 13:19 schrieb Jean-Marc Lasgouttes: > Le 06/09/11 12:21, Vincent van Ravesteijn a écrit : >> Now, this causes the translation of languageTestString() to be cached. >> If we try to load all languages to see whether they are available, the >> cached value is thus pretty much random. >> >> When we call i18nLibFileSearch, we again try to translate >> languageTestString() and we return the cached value. >> >> If you remove the above test for the translation, the translation >> doesn't cache the value for languageTestString() and no problems appear. > > When I was still young and naive about this problem, I suspected a cache > problem. Therefore I tried to disable completely the cache but the situation > did not change... > > I really think the problem is related to opening too many translation files > with gettext. But I would be delighted to be proven wrong, as it would mean > that the problem is fixed.
The man page of bind_textdomain_codeset mentions the use of iconv_open. Did you try to avoid this function call and do the charset translation manually in the old ages? Perhaps the loss of file descriptors is there. And the loss of speed on Windows too? If you didn't try that I'll investigate that. Stephan > BTW, I would not be against getting rid of this cache, which was added by > Abdel because updateLabels() was too slow on windows. I think we introduced > changes later that mitigate the issue and the cache in itself > has a cost (overhead and also a couple megabytes of memory according to > massif). > > JMarc