Ticket #4294 (new enhancement)
Start a subshell in background
Reported by: | slajerek | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Future Releases |
Component: | mc-core | Version: | master |
Keywords: | subshell | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
This is related to ticket #3580, not sure how to re-open tickets so I created a new one.
I have a similar problem, but it is not related to the solution described there and was not able to solve that problem. I see on other forums that people have similar problem so I suggest to anyway think about possible fix for this once for all and init subshell in background as described in ticket #3580 (copying here for a reference):
It might worth to start the subshell on a background thread to be able to show the main UI faster. Then a rotating dash would be displayed in the command prompt and in Ctrl-O until the subshell is ready.
In my case on macOS 10.15.7 when transitioned to ZSH the MC starts in around 6 seconds. This is totally not acceptable. The ZSH on its own starts in less than one second. The mc --nosubshell starts MC instantly, but there's no subshell which is also not acceptable. Thus, there's something fishy with instantiation of subshell in the MC, may be related to the configuration - but actually, that is not the problem of the fact that subshell init takes long, but that it is not done in the background at startup.
Change History
comment:2 Changed 3 years ago by redtux
Hi everybody,
I can confirm this issue on Ubuntu 20.04.4 LTS (focal):
- mc --version
GNU Midnight Commander 4.8.24
- zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)
Using an alias as suggested is working fine:
alias mc="SHELL=/bin/bash TERM=xterm-256color /usr/bin/mc"
(For GNU Screen I also have to override TERM as mc does not understand screen-256color-bce.)
I can confirm this. When running mc from a zsh shell, there is a delay of about 1–2 seconds (on my machine) before the panes are displayed. When running without a subshell (mc -u), mc starts with no noticeable delay. When run as
$ SHELL=/bin/bash mc
mc starts immediately; same with csh and tcsh. I have tried removing all zsh config files, including the ones under /etc, but the delay remains the same. My .zsh_history is just 28k.
Some more info:
OS version: MacOS 11.6 (running on a Macbook Air M1)
Output of zsh --version:
Output of mc --version: