Package: info
Version: 6.8-6

I noticed that "info -w" is puzzlingly slow when the argument is a man page:

    $ time -p info -w ffmpeg-all
    *manpages*
    real 1.06
    user 1.47
    sys 0.16

In contrast, "man -w" is near-instantaneous:

    $ time -p man -w ffmpeg-all
    /usr/share/man/man1/ffmpeg-all.1.gz
    real 0.05
    user 0.04
    sys 0.01

Apparently this is because "info -w" calls "man -a", which is a very inefficent way to check if a man page exists:

    $ strace -f -e trace=execve -o '| grep -w man >&2' info -w ffmpeg-all > 
/dev/null
    1142  execve("/usr/bin/man", ["/usr/bin/man", "-a", "ffmpeg-all"], 
0xfffd7dd4 /* 52 vars */) = 0


-- System Information:
Architecture: i386

Versions of packages info depends on:
ii  libc6         2.35-3
ii  libtinfo6     6.3+20220423-2
ii  install-info  6.8-6

--
Jakub Wilk

Reply via email to