[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accessibility of man pages
From: |
Dirk Gouders |
Subject: |
Re: Accessibility of man pages |
Date: |
Sat, 08 Apr 2023 22:46:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Dirk Gouders <dirk@gouders.net>
>> Cc: Colin Watson <cjwatson@debian.org>, Eli Zaretskii <eliz@gnu.org>,
>> linux-man@vger.kernel.org, help-texinfo@gnu.org,
>> nabijaczleweli@nabijaczleweli.xyz, g.branden.robinson@gmail.com,
>> groff@gnu.org
>> Date: Sat, 08 Apr 2023 21:48:13 +0200
>>
>> $ find /usr/share/man -type f -exec bzgrep -l RLIMIT_NOFILE {} \;
>> /usr/share/man/man1/runuser.1.bz2
>> /usr/share/man/man1/su.1.bz2
>> /usr/share/man/man1/nghttpx.1.bz2
>> /usr/share/man/man3/getdtablesize.3.bz2
>> /usr/share/man/man3/mq_open.3.bz2
>> /usr/share/man/man3/errno.3.bz2
>> /usr/share/man/man3/sysconf.3.bz2
>> /usr/share/man/man3p/getrlimit.3p.bz2
>> /usr/share/man/man3p/sysconf.3p.bz2
>> /usr/share/man/man3p/posix_spawn_file_actions_addclose.3p.bz2
>> /usr/share/man/man0p/sys_resource.h.0p.bz2
>> /usr/share/man/man2/pidfd_open.2.bz2
>> /usr/share/man/man2/poll.2.bz2
>> /usr/share/man/man2/getrlimit.2.bz2
>> /usr/share/man/man2/open.2.bz2
>> /usr/share/man/man2/select.2.bz2
>> /usr/share/man/man2/fcntl.2.bz2
>> /usr/share/man/man2/seccomp_unotify.2.bz2
>> /usr/share/man/man2/dup.2.bz2
>> /usr/share/man/man2/pidfd_getfd.2.bz2
>> /usr/share/man/man7/fanotify.7.bz2
>> /usr/share/man/man7/capabilities.7.bz2
>> /usr/share/man/man7/unix.7.bz2
>> /usr/share/man/man5/proc.5.bz2
>>
>> Yes, it's very slow but close to `man -K`:
>>
>> find... man -K...
>>
>> real 107.45 real 96.34
>> user 117.06 user 70.11
>> sys 14.43 sys 26.86
>>
>> [a thought later]
>>
>> Oh, I found something much faster:
>>
>> $ time -p find /usr/share/man -type f | xargs bzgrep -l RLIMIT_NOFILE
>> [snip]
>>
>> real 24.30
>> user 32.34
>> sys 6.84
>>
>> Hmm, perhaps, someone has an explanation for this?
>
> Multiprocessing, obviously. Your CPU has more than one execution
> unit, so the pipe via xargs runs 'find' and 'bzgrep' in parallel on
> two different execution units. By contrast, "find -exec" runs them
> sequentially, in a single thread.
Yes, that must be it, thanks. I noticed `man -K...` uses up to four
CPUs in parallel and therefore was unsure.
With your explanation, we can get even faster:
$ time -p find /usr/share/man -type f | xargs -P 6 bzgrep -l RLIMIT_NOFILE
[snip]
real 7.56
user 32.97
sys 7.02
Dirk
PS: Colin, too late, I noticed a Mail-Followup-To Header in your mail.
For the future: Is it correct that in such a case one should use
that recipient list (without your address) -- even if he replies to
something you wrote? In that case: I'm sorry I did that wrong.
- Re: Playground pager lsp(1), (continued)
- Re: Playground pager lsp(1), Gavin Smith, 2023/04/06
- Re: Playground pager lsp(1), Alejandro Colomar, 2023/04/07
- Re: Playground pager lsp(1), Eli Zaretskii, 2023/04/08
- Accessibility of man pages (was: Playground pager lsp(1)), Alejandro Colomar, 2023/04/08
- Re: Accessibility of man pages (was: Playground pager lsp(1)), Eli Zaretskii, 2023/04/08
- Re: Accessibility of man pages (was: Playground pager lsp(1)), Alejandro Colomar, 2023/04/08
- Re: Accessibility of man pages (was: Playground pager lsp(1)), Colin Watson, 2023/04/08
- Re: Accessibility of man pages (was: Playground pager lsp(1)), Alejandro Colomar, 2023/04/08
- Re: Accessibility of man pages, Dirk Gouders, 2023/04/08
- Re: Accessibility of man pages, Eli Zaretskii, 2023/04/08
- Re: Accessibility of man pages,
Dirk Gouders <=
- Re: Accessibility of man pages, Alejandro Colomar, 2023/04/08
- Re: Accessibility of man pages, Alejandro Colomar, 2023/04/08
- Re: Accessibility of man pages, Ingo Schwarze, 2023/04/08
- Re: Accessibility of man pages, Dirk Gouders, 2023/04/08
- Re: Accessibility of man pages, Ingo Schwarze, 2023/04/08
- Re: Accessibility of man pages, Dirk Gouders, 2023/04/09
- Re: Accessibility of man pages, Dirk Gouders, 2023/04/09
- Re: Playground pager lsp(1), G. Branden Robinson, 2023/04/06
- Re: Playground pager lsp(1), Eli Zaretskii, 2023/04/07
- Re: Playground pager lsp(1), Gavin Smith, 2023/04/07