All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>,
	Ian Rogers <irogers@google.com>, David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jonathan Corbet <corbet@lwn.net>,
	dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, 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:07:35 +0100	[thread overview]
Message-ID: <20241103000735.4k6baxhjdgws6xc4@devuan> (raw)
In-Reply-To: <20241103000534.th3jq7umwojlxnma@devuan>

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

On Sun, Nov 03, 2024 at 01:05:42AM +0100, Alejandro Colomar wrote:
> Hi Colin,
> 
> On Sat, Nov 02, 2024 at 11:47:14PM +0000, Colin Watson wrote:
> > On Sat, Nov 02, 2024 at 10:36:20PM +0100, Alejandro Colomar wrote:
> > > This is quite naive, and will not work with pages that define their own
> > > stuff, since this script is not groff(1).  But it should be as fast as
> > > is possible, which is what Colin wants, is as simple as it can be (and
> > > thus relatively safe), and should work with most pages (as far as
> > > indexing is concerned, probably all?).
> > 
> > I seem to be being invoked here for something I actually don't think I
> > want at all, which suggests that wires have been crossed somewhere.  Can
> > you explain why I'd want to replace some part of a fairly well-optimized
> > and established C program with a shell pipeline?  I'm pretty certain it
> > would not be faster, at least.
> 
> 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
> 
> 	real	0m6.166s
> 	user	0m5.132s
> 	sys	0m1.336s
> 	alx@devuan:~/src/linux/man-pages/man-pages/main$ time mansect NAME man/ \
> 		| groff -man -Tutf8 | wc
> 	   9830   27109  689478
> 
> 	real	0m0.156s
> 	user	0m0.219s
> 	sys	0m0.019s
> 
> Yes, I'm working with uncompressed pages.  We'd need to add support for
> handling compressed pages.  Also, we'd need to compare the performance
> of lexgrog(1) with compressed pages.  But for a starter, this suggests
> some good performance.
> 
> (I say with a small tweak, because the version I've posted uses
>  xargs -L1, but I've tested for performance without the -L1, which is
>  the main bottleneck.  It has no consequences for the NAME.  I need to
>  work out some nasty details with sed -n1 for the generic version,

s/n1/n/

>  though.)
> 
> 
> Have a lovely night!
> Alex
> 
> -- 
> <https://www.alejandro-colomar.es/>



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

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

  reply	other threads:[~2024-11-03  0:07 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 [this message]
2024-11-03  0:24                 ` Colin Watson
2024-11-03  0:42                   ` Alejandro Colomar
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=20241103000735.4k6baxhjdgws6xc4@devuan \
    --to=alx@kernel.org \
    --cc=airlied@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=groff@gnu.org \
    --cc=irogers@google.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.