LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mc startup slow on slackware64-current (https://www.linuxquestions.org/questions/slackware-14/mc-startup-slow-on-slackware64-current-4175556826/)

qunying 10-21-2015 07:49 PM

mc startup slow on slackware64-current
 
Hi,

I just installed a fresh Slackware64-current. mc starts up quite slow, compare with previous version. Anybody encounter the same problem?

Rinndalir 10-21-2015 09:05 PM

I don't use mc often. But it is super slow starting up on -current for me too. There's a select that it gets stuck on for 10 seconds.
The select times out and startup continues. Seems like a bug.

cwizardone 10-21-2015 09:59 PM

Quote:

Originally Posted by qunying (Post 5438270)
Hi,

I just installed a fresh Slackware64-current. mc starts up quite slow, compare with previous version. Anybody encounter the same problem?


Ditto.

frankbell 10-21-2015 10:38 PM

No problems with mc here on Slackware --Current x64. The program starts almost instantaneously.

jstg 10-21-2015 10:56 PM

I'm also not experiencing any problems with startup time for mc on Slackware64 -current. It starts up right away for me.

Qury 10-22-2015 03:00 AM

I do experience slow startup time as well. I'm not sure but seems to have something to do with whether I'm online or offline.

michelino 10-22-2015 03:16 AM

Same problem here, but occasionally and only on 1 of the three PC I hold.

Mark Pettit 10-22-2015 04:34 AM

On my laptop, when it's on a network (ie - almost all the time), it's fast. I'm busy rebuilding my server at home, and it's off the network, and definitely has a huge lag. Quite frustrating actually. Especially when you're trying to recover data from various USB devices and using mc a lot.

elcore 10-22-2015 05:12 AM

Had something like that on 14.1 it was network related, perhaps hostname and resolv.conf were not set properly.
I had compiled a new mc from current, with --disable-netcode
No problem since then.

GazL 10-22-2015 06:22 AM

This sort of thing can often be down to dns lookups against the hostname or reverse lookups against the primary network interface address. Slackware's netconfig script puts the ipv4 address associated with the hostname in /etc/hosts, but does nothing for the corresponding ipv6 address.

Assuming ipv6 hasn't been disabled, I find that adding the ipv6 address to /etc/hosts can often help avoid the delays associated with this sort of external dns lookup: which is especially important if, like me, you use a made-up/unresolvable domain name for your local net or often work off-net.
e.g.
Code:

# For loopbacking.
127.0.0.1                      localhost
::1                            localhost

# Local interfaces
192.168.0.2                    ws2.my.domain ws2
fe80::????:????:????:????      ws2.my.domain ws2

(replacing the ???? with whatever ifconfig shows you for the ipv6 address.)


Give it a go, see if it helps.

qunying 10-22-2015 03:54 PM

My slackware64-14.1 with mc-4.18.13 starts instantly, if I compile the mc-4.18.14 from current source, mc starts slowly. Seems something in 4.18.14 breaks.

I tried #GazL's method, without success. I tried bring down all my network interface, only have lo active, still the same.

qunying 10-22-2015 07:34 PM

OK, I found the problem. It was also reported here #3534.

It is because of the PROMPT_COMMAND definition I used. I am using hh (shell history suggest box), and with its recommendation of settings, which is:
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"

Which results in broken subshell and hence the slow down.

Rinndalir 10-23-2015 01:09 PM

After I read that bug report, since I don't use mc much, I did removepkg mc.

That's crazy stuff in that report. The fix is to change your prompt. That is known as the tail wagging the dog.

It has nothing to do with the delay I see. Glad it solved your problem though.

Diantre 10-23-2015 08:32 PM

Quote:

Originally Posted by Rinndalir (Post 5439156)
After I read that bug report, since I don't use mc much, I did removepkg mc.

That's crazy stuff in that report. The fix is to change your prompt. That is known as the tail wagging the dog.

Interesting. I also read the bug report, since I use mc a lot. The only thing I saw there was a bug related to the handling of an exported variable in mc's subshells, $PROMPT_COMMAND. The contents of this variable are executed by bash before the actual prompt is displayed ($PS1). Nothing crazy IMHO, I've seen much worse elsewhere...

Modifying $PROMPT_COMMAND is not the fix to the problem, it's only a workaround until the devs decide how to approach the problem. At this point they're still discussing it. I'm sorry, but I don't see the tail wagging the dog. :)

cwizardone 03-29-2016 07:14 PM

Quote:

Originally Posted by qunying (Post 5438270)
Hi,

I just installed a fresh Slackware64-current. mc starts up quite slow, compare with previous version. Anybody encounter the same problem?

This is still a problem and has been for long time through various versions.
I just fired up mc in a console and it took 12 seconds on -current, a fresh install just the day before yesterday and updated through this morning.


All times are GMT -5. The time now is 10:08 PM.