Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mc is slow to start #3564

Closed
mc-butler opened this issue Nov 21, 2015 · 4 comments
Closed

mc is slow to start #3564

mc-butler opened this issue Nov 21, 2015 · 4 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress res: invalid The ticket is not a bug, or is a support request

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3564
Reporter imre84 (@imre84)

$ LC_MESSAGES=C mc -V
GNU Midnight Commander 4.8.14
Built with GLib 2.42.2
Using the ncurses library
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

$ LC_MESSAGES=C mc -F
Root directory: /home/imi

[System data]

Config directory: /etc/mc/
Data directory: /usr/share/mc/
File extension handlers: /usr/libexec/mc/ext.d/
VFS plugins and scripts: /usr/libexec/mc/

extfs.d: /usr/libexec/mc/extfs.d/
fish: /usr/libexec/mc/fish/

[User data]

Config directory: /home/imi/.config/mc/
Data directory: /home/imi/.local/share/mc/

skins: /home/imi/.local/share/mc/skins/
extfs.d: /home/imi/.local/share/mc/extfs.d/
fish: /home/imi/.local/share/mc/fish/
mcedit macros: /home/imi/.local/share/mc/mc.macros
mcedit external macros: /home/imi/.local/share/mc/mcedit/macros.d/macro.*

Cache directory: /home/imi/.cache/mc/

$ mc --configure-options

'--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--disable-silent-rules' '--disable-dependency-tracking' '--enable-nls' '--enable-vfs' '--enable-vfs-undelfs' '--enable-charset' '--with-x' '--disable-vfs-smb' '--disable-vfs-sftp' '--enable-aspell' '--with-gpm-mouse' '--with-screen=ncurses' '--with-internal-edit' '--disable-mclib' '--disable-tests' '--with-homedir=XDG' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-O2 -march=x86-64 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig'

mc used to start quickly :) ... until five minutes ago :( ... but I know what changes I made in that five minutes :)

here's the 3 lines I appended to my /etc/bash/bashrc file:
export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
export PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"

as a test I just commented out those to test if really those three lines cause the problem, once they commented out mc starts quickly again (in a newly started shell). when I put those back in, mc starts slowly again.

the final values of the relevant environment variables:

$ echo "$HISTCONTROL"
ignoredups:erasedups
$ echo "$PROMPT_COMMAND"
history -n; history -w; history -c; history -r;
$ shopt
autocd off
cdable_vars off
cdspell off
checkhash off
checkjobs off
checkwinsize on
cmdhist on
compat31 off
compat32 off
compat40 off
compat41 off
compat42 off
complete_fullquote on
direxpand off
dirspell off
dotglob off
execfail off
expand_aliases on
extdebug off
extglob on
extquote on
failglob off
force_fignore on
globstar off
globasciiranges off
gnu_errfmt off
histappend on
histreedit off
histverify off
hostcomplete off
huponexit off
interactive_comments on
lastpipe off
lithist off
login_shell off
mailwarn off
no_empty_cmd_completion on
nocaseglob off
nocasematch off
nullglob off
progcomp on
promptvars on
restricted_shell off
shift_verbose off
sourcepath on
xpg_echo off

I like what those three lines do, so I hope that this information is enough for you to find the bug and fix it :)

If not, I would be happy to provide any more info. Just let me know :)

Thank you in advance.

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Nov 21, 2015 at 22:51 UTC

Replying to imre84 (#3564):

here's the 3 lines I appended to my /etc/bash/bashrc file:
export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
export PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"

You fell victim to this bug:

#3534

It was fixed in MC 4.15.

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Nov 21, 2015 at 23:09 UTC (comment 1.2)

Replying to mooffie:

It was fixed in MC 4.15.

I mean in 4.8.15.

@mc-butler
Copy link
Author

Changed by imre84 (@imre84) on Nov 22, 2015 at 0:58 UTC (comment 3)

Indeed, removing the last semicolon from the end of variable PROMPT_COMMAND sped mc up again. Thank you for your reply.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 22, 2015 at 4:12 UTC (comment 4)

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone Future Releases deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress res: invalid The ticket is not a bug, or is a support request
Development

No branches or pull requests

1 participant