delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/31/20:00:35

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=wWmheJ0i0W4R1F1VWKQEGlKtKcNx1lMfGt5r83oWhlw
u3TbTqqC3sAiZLeCeofY83zCCj81Zf2pMJy/nFOLgeEdu+eqP/7Jt0QKVtQxk4EE
cBMCbbaQhDsy6whLYcbWqej70DaqWY5oVleKbORAhlm/zgN3JS/QyyM4MgU9cmLc
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=x4766IQy1MVMv3qeZB56jDqMVM8=; b=FQ72gGeVJKL4WIviT
mBLltqpN7ZSIrSbOYbvfYdSnvcyQGuunriqCDF3kj6KgQk5HnI06VyiD7G+nsgFT
MmDwQlsOll+IixLQneDdISl0/nMVhlALKvowAQtEY4lKpjam7VJl7EllNWGpsjjq
UP2TUhlbz3G4y0HfyU1bGY7YyQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qa0-f41.google.com
X-Received: by 10.224.46.130 with SMTP id j2mr36640070qaf.7.1391216416573; Fri, 31 Jan 2014 17:00:16 -0800 (PST)
Message-ID: <52EC4727.2000308@gmail.com>
Date: Fri, 31 Jan 2014 20:00:23 -0500
From: Max Polk <maxpolk AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How big are your /etc/passwd and /etc/group files?
References: <20140131203738 DOT GA8707 AT calimero DOT vinschen DOT de> <CAKf2h5R-FuQX9W=ojw4+ez8gqOHjwYshMh3FmmfNu3r12sRFeQ AT mail DOT gmail DOT com> <20140131220314 DOT GH2821 AT calimero DOT vinschen DOT de>
In-Reply-To: <20140131220314.GH2821@calimero.vinschen.de>
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019