Eli Zaretskii <e...@gnu.org> writes: > Perhaps we could call _configthreadlocale to see if the value of > setlocale can be cached?
Yes, but then we would need to hook setlocale to invalidate the cache, and currently the setlocale module is not listed in the dependencies of localcharset. I'm wondering if it is worth adding the dependency for this particular performance problem. Perhaps it might be easier to add a new API to localcharset for single-threaded / single-locale consumer. Regards, -- Daiki Ueno