Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!nikhefh!e07 From: e07@nikhefh.nikhef.nl (Eric Wassenaar) Newsgroups: comp.sys.apollo Subject: Re: reducing the delay between edrgy and getpwuid() etc ... Message-ID: <1157@nikhefh.nikhef.nl> Date: 23 Feb 91 22:20:20 GMT References: <1991Feb20.211014.5823@bwdls61.bnr.ca> <4ff2e1af.20b6d@apollo.HP.COM> Sender: e07@nikhef.nl (Eric Wassenaar) Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 22 In article <4ff2e1af.20b6d@apollo.HP.COM>, pato@apollo.HP.COM (Joe Pato) writes: > appropriate entry). If you find that you need to use getpwent > you will observe much better performance if you first call: > setpwfile("/etc//passwd"); This indeed gives a VERY substantial performance increase. You certainly want to include this line in your favourite version of the finger program and the like. However: a. As Joe Pato outlined, in SR10.2 and before this way of reading the passwd file may not reflect the most up-to-date status of the registry database. b. You may want to filter out entries for names that appear in the 'person' database, but for which there is not an actual account. Such entries show up with a password field of '*NOACCT*', a home directory of '/homeless', and a gid of '2' (sic!). Eric Wassenaar -- Organization: NIKHEF-H, National Institute for Nuclear and High-Energy Physics Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands Phone: +31 20 592 0412, Home: +31 20 909449, Telefax: +31 20 592 5155 Internet: e07@nikhef.nl Brought to you by Super Global Mega Corp .com