Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!apollo!apollo.hp.com!pato From: pato@apollo.HP.COM (Joe Pato) Newsgroups: comp.sys.apollo Subject: Re: reducing the delay between edrgy and getpwuid() etc ... Message-ID: <4ff2e1af.20b6d@apollo.HP.COM> Date: 21 Feb 91 15:46:00 GMT References: <1991Feb20.211014.5823@bwdls61.bnr.ca> <9102210942.aa20303@concour.cs.concordia.ca> Sender: root@apollo.HP.COM Reply-To: pato@apollo.HP.COM (Joe Pato) Organization: Hewlett-Packard Apollo Division - Chelmsford, MA Lines: 21 In general it is a bad idea to use the getpwent call when getpwnam or getpwuid would be better suited (getpwent will iterate the entire database while getpwnam and getpwuid use keyed access to find the appropriate entry). If you find that you need to use getpwent you will observe much better performance if you first call: setpwfile("/etc//passwd"); The "//" in this pathname is significant - it will force the library functions to actually read the ascii file instead of using RPC calls to the server. You should also note that as of sr10.3 the passwd (and group and org) type managers will obtain a current view of the file and cache it locally. Before sr10.3 the passwd (and others) file is checkpointed every two hours. -- Joe Pato Cooperative Computing Division Hewlett-Packard Company pato@apollo.hp.com Brought to you by Super Global Mega Corp .com