Re: very slow start of mc (4.6.0) on FreeBSD5.1-Release



>>>>> "Michal" == Michal Szwaczko <mikey wirelabs lublin pl> writes:
Michal> 
Michal> On Wed, Jul 02, 2003 at 10:58:07AM +0200, Oliver Hoffmann wrote:
>> Hi developers!
>> 
>> I just installed FreeBSD5.1-Release and I wonder why it takes 35s on my 
>> Athlon1000-system to start the program. Similar boxes with FreeBSD4.8 or 
>> Debian 3.0 have a startup time of less than 2s.
>> Even mc -V takes ages.
>> What's wrong?
>> Thanks for hints. Maybe I could help you as well.
Michal> 
Michal> Your DNS is not configured or not responding. 
Michal> mc does gethostbyname() on startup IIRC. 
Michal> Check your /etc/resolv.conf 
Michal> 
Michal> Try to do netstat -a or anything that resolves hostnames 
Michal> If it freezes - it's your DNS configuration's fault. 
Michal> mc is no exception as it uses gethostbyname().
Michal> 
Michal> Anyway, it's for mc-users rather than mc-devel, try there ...
Michal> 
Michal> HTH

Sometime ago I made a floppy linux that had mc on it:

http://rgr.freeshell.org/flinux/mc-link/

This calling of gethostbyname() was a problem for me, because I needed
to include libnss libraries on the floppy which had limited space, but
I didn't really ever need to resolve a host name (the networking was
only IP address based.)  As I remember, I believe mc did not directly
link to the library, but loaded it when you needed it, thus tricking
me into thinking it didn't need that library because that library
wasn't listed in the output of "ldd /usr/bin/mc".

I considered changing the midnight commander code at the time but
managed to squeeze everything on a floppy in the end.

Perhaps in a future version of my floppy I might change mc to not call
gethostbyname() if it can't find that library; if so I will submit a
patch.  However, it works great now and I am very appreciative to all
the programmers who have worked in midnight commander.

--Rob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]