Linux Manual Pages development
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>,
	linux-man@vger.kernel.org, groff@gnu.org
Subject: Re: [PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page
Date: Sun, 3 Nov 2024 01:42:48 +0100	[thread overview]
Message-ID: <20241103004248.pes42quf7ptelt3y@devuan> (raw)
In-Reply-To: <ZybC1lsbMb91DzFW@riva.ucam.org>

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

[CC trimmed]

Hi Colin,

On Sun, Nov 03, 2024 at 12:24:54AM +0000, Colin Watson wrote:
> On Sun, Nov 03, 2024 at 01:05:34AM +0100, Alejandro Colomar wrote:
> > Are you sure?  With a small tweak, I get the following comparison:
> > 
> > 	alx@devuan:~/src/linux/man-pages/man-pages/main$ time lexgrog man/*/* | wc
> > 	lexgrog: can't resolve man7/groff_man.7
> > 	  12475   99295  919842
> 
> Comparing anything to lexgrog isn't very interesting; it's a debugging
> tool and is not in itself very performance-sensitive.  As I've explained
> elsewhere, the interesting thing is mandb, which uses the same code
> in-process to scan a whole tree of pages in one go.  I do not expect to
> ever want to replace that with a shell pipeline.

I don't know how to compare to mandb(8), since it does other stuff, and
skips some when things haven't changed.  In any case, if this is of any
use, you may use it to compare, if you have an idea of what's more or
less the percentage of time that mandb(8) spends on this task:

alx@devuan:~/src/linux/man-pages/man-pages/master$ time mansect NAME man/ | wc
   4851   23548  169216

real	0m0.044s
user	0m0.033s
sys	0m0.015s
alx@devuan:~/src/linux/man-pages/man-pages/master$ time mandb man/ |& wc
     30     179    2487

real	0m1.341s
user	0m1.065s
sys	0m0.302s
alx@devuan:~/src/linux/man-pages/man-pages/master$ time mandb man/ |& wc
     15      80    1116

real	0m0.030s
user	0m0.013s
sys	0m0.008s


This has been run on the Linux man-pages repository, with uncompressed
pages.  I've optimized mansect(1) to be 3x faster, and slightly simpler
and more robust, compared to the version posted on the list (and xargs
doesn't need -L1 anymore).


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-11-03  0:42 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 21:17 [PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page Ian Rogers
2024-10-15 21:17 ` [PATCH v2 2/3] proc_pid_fdinfo.5: Add subsection headers for different fd types Ian Rogers
2024-10-15 21:17 ` [PATCH v2 3/3] proc_pid_fdinfo.5: Add DRM subsection Ian Rogers
2024-11-01 13:24 ` [PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page Alejandro Colomar
2024-11-01 18:19   ` Ian Rogers
2024-11-01 20:07     ` Alejandro Colomar
2024-11-02 10:08       ` G. Branden Robinson
2024-11-02 10:39         ` Alejandro Colomar
2024-11-02 21:36           ` Alejandro Colomar
2024-11-02 23:47             ` Colin Watson
2024-11-03  0:05               ` Alejandro Colomar
2024-11-03  0:07                 ` Alejandro Colomar
2024-11-03  0:24                 ` Colin Watson
2024-11-03  0:42                   ` Alejandro Colomar [this message]
2024-11-03  0:47                 ` Colin Watson
2024-11-03  1:09                   ` G. Branden Robinson
2024-11-03  1:18                     ` Colin Watson
2024-11-03  1:59                   ` Alejandro Colomar
2024-11-03 14:32                     ` Colin Watson
2024-11-03  4:05           ` G. Branden Robinson
2024-11-02 19:06         ` Colin Watson
2024-11-03  0:50           ` G. Branden Robinson
2024-11-03  1:55             ` Colin Watson
2024-11-02 23:10     ` [PATCH 0/3] Add mansect(1) program and manual page Alejandro Colomar
2024-11-02 23:10       ` [PATCH] CONTRIBUTING.d/patches: Document new features alongside the features Alejandro Colomar
2024-11-02 23:17         ` Alejandro Colomar
2024-11-02 23:10       ` [PATCH 1/3] signal.7: Better description for SIGFPE Alejandro Colomar
2024-11-02 23:17         ` Alejandro Colomar
2024-11-02 23:10       ` [PATCH 2/3] src/bin/mansect, mansect.1: Add program and its manual page Alejandro Colomar
2024-11-02 23:10       ` [PATCH 3/3] scripts/bash_aliases: man_section(), man_lsfunc(), man_lsvar(): Use mansect(1) Alejandro Colomar
2024-11-03  1:16       ` [PATCH v2 0/4] Add mansect(1) Alejandro Colomar
2024-11-03  1:16         ` [PATCH v2 1/4] src/bin/mansect, mansect.1: Add program and its manual page Alejandro Colomar
2024-11-03  1:17         ` [PATCH v2 2/4] scripts/bash_aliases: man_lsfunc(), man_lsvar(): Use mansect(1) Alejandro Colomar
2024-11-03  1:17         ` [PATCH v2 3/4] scripts/bash_aliases: man_lsfunc(), man_lsvar(): Use pcre2grep(1) instead of pcregrep(1) Alejandro Colomar
2024-11-03  1:17         ` [PATCH v2 4/4] src/bin/mansect: Preprocess with preconv(1) Alejandro Colomar

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=20241103004248.pes42quf7ptelt3y@devuan \
    --to=alx@kernel.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=groff@gnu.org \
    --cc=linux-man@vger.kernel.org \
    /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