Re: faster /etc/services

2007-05-21 Thread Michael Bushkov
Hi, As far as I remember this topic has been already discussed. There are basically 2 ways of speeding up /etc/services queries: 1. To use /etc/passwd-/pwd.db scheme - i.e. using BDB as the main data storage and allowing user to update it from /etc/services file by request. 2. Use the separate

Re: faster /etc/services

2007-05-21 Thread Anton Yuzhaninov
Monday, May 21, 2007, 11:09:38 AM, Edwin Groothuis wrote: EG> - Instead of reading and parsing /etc/services every time, use a EG> hash or btree file a la the aliases database. A hash one (first EG> key, next key) could be a replacement to use with getservent(), EG> while a btree one could b

Re: faster /etc/services

2007-05-21 Thread Niki Denev
Edwin Groothuis wrote: > Hello, > > After the last patch I submitted with regarding to /etc/services, > I was asked if I could see if I could do something about the speed > of it. Personally I don't worry too much about it, my programs only > access getservbyname() only once per program :-) > > I

Re: faster /etc/services

2007-05-21 Thread Edwin Groothuis
On Mon, May 21, 2007 at 09:50:28AM +0300, Niki Denev wrote: > > Anybody with comments or suggestions from earlier threads like this? > > I think there is cached(8) daemon in -current that does exactly this, > and more. Dunno if it will get in -stable. I was pointed to that by grog@, but I never h

faster /etc/services

2007-05-21 Thread Edwin Groothuis
Hello, After the last patch I submitted with regarding to /etc/services, I was asked if I could see if I could do something about the speed of it. Personally I don't worry too much about it, my programs only access getservbyname() only once per program :-) I did some tests with it, and at this mo