From: Alejandro Colomar <alx.manpages@gmail.com>
To: Dirk Gouders <dirk@gouders.net>, Eli Zaretskii <eliz@gnu.org>,
cjwatson@debian.org, Ingo Schwarze <schwarze@usta.de>
Cc: linux-man@vger.kernel.org, help-texinfo@gnu.org,
nabijaczleweli@nabijaczleweli.xyz, g.branden.robinson@gmail.com,
groff@gnu.org
Subject: Re: Accessibility of man pages
Date: Sat, 8 Apr 2023 23:53:33 +0200 [thread overview]
Message-ID: <3770fc9f-a098-6696-8510-b1f583f06992@gmail.com> (raw)
In-Reply-To: <ghcz4eksp5.fsf@gouders.net>
[-- Attachment #1.1: Type: text/plain, Size: 3777 bytes --]
Hi Dirk, Ingo, Eli, Colin,
I prepared some (hopefully) fair comparison:
$ sudo make install-man prefix=/opt/local/man/compressed -j LINK_PAGES=symlink Z=.gz >/dev/null
$ sudo make install-man prefix=/opt/local/man/expanded__ -j LINK_PAGES=symlink >/dev/null
I don't know what kind of magic man(1) does to be so fast reading compressed pages:
$ export MANPATH=/opt/local/man/compressed/share/man
$ time man -Kaw RLIMIT_NOFILE | wc -l
17
real 0m0.330s
user 0m0.261s
sys 0m0.074s
$ time find $MANPATH -type f | xargs zgrep -l RLIMIT_NOFILE | wc -l
17
real 0m3.732s
user 0m4.776s
sys 0m0.703s
$ time find $MANPATH -type f | xargs -P0 zgrep -l RLIMIT_NOFILE | wc -l
17
real 0m3.403s
user 0m4.706s
sys 0m0.699s
$ time find $MANPATH -type f | while read f; do zcat $f | grep -l RLIMIT_NOFILE >/dev/null && echo "$f"; done | wc -l
17
real 0m3.730s
user 0m4.769s
sys 0m1.973s
man(1) seems to be faster than reading uncompressed pages! See:
$ export MANPATH=/opt/local/man/expanded__/share/man
$ time man -Kaw RLIMIT_NOFILE | wc -l
35
real 0m1.138s
user 0m0.669s
sys 0m0.470s
$ time find $MANPATH -type f | xargs grep -l RLIMIT_NOFILE | wc -l
17
real 0m0.018s
user 0m0.007s
sys 0m0.015s
Having the pages uncompressed seems to be an important advantage for
searching through the sources. 0.018 (with the manual search) is
more than 10x faster than what man(1) can get from compressed pages.
And it allows using more complex tools, like pcre2grep(1), or sed(1)
for more complex searches.
Colin, did I do anything wrong to have this slowness in man(1) with
uncompressed pages? Also, it's finding some repeated lines; did we
find a bug?
$ man -Kaw RLIMIT_NOFILE
/opt/local/man/expanded__/share/man/man3/errno.3
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man3/getdtablesize.3
/opt/local/man/expanded__/share/man/man3/mq_open.3
/opt/local/man/expanded__/share/man/man3/sysconf.3
/opt/local/man/expanded__/share/man/man2/fcntl.2
/opt/local/man/expanded__/share/man/man2/fcntl.2
/opt/local/man/expanded__/share/man/man2/open.2
/opt/local/man/expanded__/share/man/man2/open.2
/opt/local/man/expanded__/share/man/man2/open.2
/opt/local/man/expanded__/share/man/man2/poll.2
/opt/local/man/expanded__/share/man/man2/poll.2
/opt/local/man/expanded__/share/man/man2/seccomp_unotify.2
/opt/local/man/expanded__/share/man/man2/pidfd_getfd.2
/opt/local/man/expanded__/share/man/man2/dup.2
/opt/local/man/expanded__/share/man/man2/dup.2
/opt/local/man/expanded__/share/man/man2/dup.2
/opt/local/man/expanded__/share/man/man2/getrlimit.2
/opt/local/man/expanded__/share/man/man2/getrlimit.2
/opt/local/man/expanded__/share/man/man2/getrlimit.2
/opt/local/man/expanded__/share/man/man2/getrlimit.2
/opt/local/man/expanded__/share/man/man2/getrlimit.2
/opt/local/man/expanded__/share/man/man2/pidfd_open.2
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man2/select.2
/opt/local/man/expanded__/share/man/man5/proc.5
/opt/local/man/expanded__/share/man/man5/proc.5
/opt/local/man/expanded__/share/man/man7/capabilities.7
/opt/local/man/expanded__/share/man/man7/fanotify.7
/opt/local/man/expanded__/share/man/man7/unix.7
$ grep -n RLIMIT_NOFILE /opt/local/man/expanded__/share/man/man2/select.2
412:.B RLIMIT_NOFILE
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-04-08 21:53 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 20:37 Playground pager lsp(1) Dirk Gouders
2023-03-25 20:47 ` Dirk Gouders
2023-04-04 23:45 ` Alejandro Colomar
2023-04-05 5:35 ` Eli Zaretskii
2023-04-06 1:10 ` Alejandro Colomar
2023-04-06 8:11 ` Eli Zaretskii
2023-04-06 8:48 ` Gavin Smith
2023-04-07 22:01 ` Alejandro Colomar
2023-04-08 7:05 ` Eli Zaretskii
2023-04-08 13:02 ` Accessibility of man pages (was: Playground pager lsp(1)) Alejandro Colomar
2023-04-08 13:42 ` Eli Zaretskii
2023-04-08 16:06 ` Alejandro Colomar
2023-04-08 13:47 ` Colin Watson
2023-04-08 15:42 ` Alejandro Colomar
2023-04-08 19:48 ` Accessibility of man pages Dirk Gouders
2023-04-08 20:02 ` Eli Zaretskii
2023-04-08 20:46 ` Dirk Gouders
2023-04-08 21:53 ` Alejandro Colomar [this message]
2023-04-08 22:33 ` Alejandro Colomar
2023-04-09 10:28 ` Ralph Corderoy
2023-04-08 20:31 ` Ingo Schwarze
2023-04-08 20:59 ` Dirk Gouders
2023-04-08 22:39 ` Ingo Schwarze
2023-04-09 9:50 ` Dirk Gouders
2023-04-09 10:35 ` Dirk Gouders
[not found] ` <87a5zhwntt.fsf@ada>
2023-04-09 12:05 ` Compressed man pages (was: Accessibility of man pages (was: Playground pager lsp(1))) Alejandro Colomar
2023-04-09 12:17 ` Alejandro Colomar
2023-04-09 18:55 ` G. Branden Robinson
2023-04-09 12:29 ` Colin Watson
2023-04-09 13:36 ` Alejandro Colomar
2023-04-09 13:47 ` Compressed man pages Ralph Corderoy
2023-04-12 8:13 ` Compressed man pages (was: Accessibility of man pages (was: Playground pager lsp(1))) Sam James
2023-04-12 8:32 ` Compressed man pages Ralph Corderoy
2023-04-12 10:35 ` Mingye Wang
2023-04-12 10:55 ` Ralph Corderoy
2023-04-12 13:04 ` Compressed man pages (was: Accessibility of man pages (was: Playground pager lsp(1))) Kerin Millar
2023-04-12 14:24 ` Alejandro Colomar
2023-04-12 18:52 ` Mingye Wang
2023-04-12 20:23 ` Compressed man pages Alejandro Colomar
2023-04-13 10:09 ` Ralph Corderoy
2023-04-07 2:18 ` Playground pager lsp(1) G. Branden Robinson
2023-04-07 6:36 ` Eli Zaretskii
2023-04-07 11:03 ` Gavin Smith
2023-04-07 14:43 ` man page rendering speed (was: Playground pager lsp(1)) G. Branden Robinson
2023-04-07 15:06 ` Eli Zaretskii
2023-04-07 15:08 ` Larry McVoy
2023-04-07 17:07 ` man page rendering speed Ingo Schwarze
2023-04-07 19:04 ` man page rendering speed (was: Playground pager lsp(1)) Alejandro Colomar
2023-04-07 19:28 ` Gavin Smith
2023-04-07 20:43 ` Alejandro Colomar
2023-04-07 16:08 ` Colin Watson
2023-04-08 11:24 ` Ralph Corderoy
2023-04-07 21:26 ` reformatting man pages at SIGWINCH " Alejandro Colomar
2023-04-07 22:09 ` reformatting man pages at SIGWINCH Dirk Gouders
2023-04-07 22:16 ` Alejandro Colomar
2023-04-10 19:05 ` Dirk Gouders
2023-04-10 19:57 ` Alejandro Colomar
2023-04-10 20:24 ` G. Branden Robinson
2023-04-11 9:20 ` Ralph Corderoy
2023-04-11 9:39 ` Dirk Gouders
2023-04-17 6:23 ` G. Branden Robinson
2023-04-08 11:40 ` Ralph Corderoy
2023-04-05 10:02 ` Playground pager lsp(1) Dirk Gouders
2023-04-05 14:19 ` Arsen Arsenović
2023-04-05 18:01 ` Dirk Gouders
2023-04-05 19:07 ` Eli Zaretskii
2023-04-05 19:56 ` Dirk Gouders
2023-04-05 20:38 ` A less presumptive .info? (was: Re: Playground pager lsp(1)) Arsen Arsenović
2023-04-06 8:14 ` Eli Zaretskii
2023-04-06 8:56 ` Gavin Smith
2023-04-07 13:14 ` Arsen Arsenović
2023-04-06 1:31 ` Playground pager lsp(1) Alejandro Colomar
2023-04-06 6:01 ` Dirk Gouders
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3770fc9f-a098-6696-8510-b1f583f06992@gmail.com \
--to=alx.manpages@gmail.com \
--cc=cjwatson@debian.org \
--cc=dirk@gouders.net \
--cc=eliz@gnu.org \
--cc=g.branden.robinson@gmail.com \
--cc=groff@gnu.org \
--cc=help-texinfo@gnu.org \
--cc=linux-man@vger.kernel.org \
--cc=nabijaczleweli@nabijaczleweli.xyz \
--cc=schwarze@usta.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).