Date: Mon, 25 Jan 2010 23:37:49 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/libc/nls msgcat.c Message-ID: <201001252338.o0PNc1Qr038726@repoman.freebsd.org>
index | next in thread | raw e-mail
gabor 2010-01-25 23:37:49 UTC
FreeBSD src repository
Modified files:
lib/libc/nls msgcat.c
Log:
SVN rev 202992 on 2010-01-25 23:37:49Z by gabor
Cache failing and opened catalogs in catopen() and related functions.
Continuous catopen() calls cause 4 failig stat(2) each, which means a lot
of overhead. It is also a good idea to keep the opened catalogs in the memory
to speed up further catopen() calls to the same catalog since these catalogs
are not big at all. In this case, we count references and only free() the
allocated space when the reference count reaches 0. The reads and writes to
the cache are syncronized with an rwlock when these functions are called from
a threaded program.
Requested by: kib
Approved by: delphij
Revision Changes Path
1.51 +131 -17 src/lib/libc/nls/msgcat.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001252338.o0PNc1Qr038726>
