This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LC_* number reduction


Hi!

> A call to setlocale opens currently 11 locale files. The needed file operations are expensive. The files
> for one locale should be consolidated.
>
> One drawback is, though, that this will probably eliminate the size optimization currently implemented
> which reduces entire locale files to hard links of existing files. The space savings can be large.
> Therefore this scheme should be optional.

I completely missed this todo item. Looking at how big and hardlinkable the
files are, I'd say glibc should use 3 locale files, not 11 nor 1:
LC_COLLATE
LC_CTYPE
LC_LOCALE (or however would be the rest of other LC_* files would be called together)

This scheme IMHO doesn't have to be optional.
The largest non-COLLATE non-CTYPE LC_* files on my box (with lots of .utf8
locales) are LC_TIME, where largest is a tad bit over 3KB, smallest tad bit
over 2KB. The rest of LC_* files are < 470B.
LC_TIME has at most 21 nlinks (arabic UTF8 locales) but on average 1-2, and
at least ATM LC_LOCALE could fit under 4KB for all locales (and 4KB block
filesystems are most common in these days IMHO).

The WWW page lists this as started, though I cannot find any changes related
to this.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]