jedsoft / jed

Programmer's text editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slow or stalled startup depending on the network

olesenm opened this issue · comments

Hi @jedsoft

I've noticed occasionally odd lag and even total blocking (!) when using jed and my network connect has issues (either VPN stuff, or my kids have somehow overloaded the router). From a quick scan of the code, I think that it might be whole intrinsics inside of userinfo.c.

It goes off and gets the FQDN etc, so that it can offer it later as a string constant if someone needs it.

My current experimental stop-gap is to only start jed/xjed from an Xjed script with this type of content:

# Pretend to be FQDN in case network has issues
# - I mostly don't need domain anyhow
case "$HOSTNAME" in
('' | *.*)    # Nothing to do (empty or already FQDN)
    ;;
(*)           # Fake domain
    HOSTNAME="$HOSTNAME.local"
    ;;
esac

No stress, but there must be a better way.

Cheers,

/mark

Hi Mark,

What are the contents of your /etc/nsswitch.conf file? I would like to be able to reproduce this. I assume that this is occurring with the latest version in the git repos.

Thanks, --John

Hi John,
Thanks for getting back on this.

I'm running on my local router with opensuse + wicked network manager (FWIW). The nsswitch.conf:

passwd: files usrfiles
group:  files usrfiles
shadow: compat

hosts:          files mdns_minimal [NOTFOUND=return] dns
networks:       files dns

services:       files
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       files nis
publickey:      files

bootparams:     files
automount:      files nis
aliases:        files

I pushed a change meant to address this. It defers the querying of the name server until the hostname is required. To avoid this, use the set_hostname function in your .jedrc file. If this works for you, then I will close this issue.

Hi @jedsoft - I'll give the updated version a go. But since it could take some time until this seemingly random error occurs again, I will close out the issue now. If it recurs again, I'll reopen and tag you.

Thanks,

/mark