Re: top(1) takes ages to start up

2001-09-08 Thread Nick Hibma
Why don't you add an early-out for namelength = 15 or put the if-statement in the loop: Index: machine.c === RCS file: /home/ncvs/src/usr.bin/top/machine.c,v retrieving revision 1.44 diff -u -r1.44 machine.c --- machine.c

Re: top(1) takes ages to start up

2001-09-08 Thread Alfred Perlstein
* Nick Hibma [EMAIL PROTECTED] [010908 04:51] wrote: Why don't you add an early-out for namelength = 15 or put the if-statement in the loop: This is a good idea, however it fails for the case when everyone has been assigned usernames that are less than 15 characters, I would suggest putting

Re: top(1) takes ages to start up

2001-09-08 Thread Thomas Quinot
Le 2001-09-08, Nick Hibma écrivait : Why don't you add an early-out for namelength = 15 or put the if-statement in the loop: Well, in my case all usernames are = 8 characters, so the proposed changes would not prevent a complete walk of the NIS db. Thomas. -- [EMAIL PROTECTED] To

top(1) takes ages to start up

2001-09-07 Thread Thomas Quinot
... because it walks through the entire NIS db just to find out what the longest user name is (/src/usr.bin/top/machine.c 1.5). At this site, this means 2800 RPC calls and dozens of seconds when the network and/or NIS server are busy. What do others think of the following patch? Thomas. ---