This is the mail archive of the cygwin mailing list for the Cygwin project.


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

Re: How big are your /etc/passwd and /etc/group files?


On 1/31/2014 5:03 PM, Corinna Vinschen wrote:
On Jan 31 22:40, Frank Fesevur wrote:
2014-01-31 Corinna Vinschen:
   Is anybody here who's using /etc/passwd and/or group files
   of more than 16K in size?
The new way to store the stuff would make Cygwin definitely faster, but it would struggle with... uhm... 2.6 Megs file on the 32 bit version of Cygwin, Hmm. I'm wondering how to solve that elegantly. Corinna

Every process needs to load only the current user's entry up front. Somewhere down the road it only *might* have to do things like translate from uid/gid into a string for directory listings, in some cases only a handful of these translations. It's essentially a (old dbm style unix) database lookup.

So defer the database lookups to a libgdbm that goes against a (old dbm style unix) database, and don't keep that in memory, unless you want a small LRU algorithm in there to keep a small fixed number. I bet the tiny delay later on a ls or other unix translation won't be very noticeable.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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