🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.netbsd.tech.userlevel
Article #76

Re: [PATCH] Remove useless warning from man(1)

#76
From: Mouse
Date: Tue, 10 Nov 2026 13:42
57 lines
3724 bytes
>> Teal deer: don't skip the warning.  (But maybe don't print it unless
>> nroff is taking longer than 5 seconds?)
> Yeah, don't try nroff, but the mandoc we are actually using.

As far as I know I don't have access to a slow machine running anything
recent enough to have mandoc, so I can't give actual times.

But I have access to a 9.1 amd64 machine.  Using mandoc there, I have
trouble timing because that hardware is so fast.  But complexity still
makes a significant difference.  Using time(1), with the same seven
files copied from 1.4T (so as to change less between tests), and
running each one 100 times to get a couple more significant digits:

for i in *;
do
	ls -l $i
	time sh -c "for a in 0 1 2 3 4 5 6 7 8 9; do
			for b in 0 1 2 3 4 5 6 7 8; do
				mandoc < $i > /dev/null
			done
		done"
done

=>

-r--r--r--  1 mouse  wheel  109360 Jun 27  2024 gcc.1
        2.68 real         2.22 user         0.46 sys
-r--r--r--  1 mouse  wheel  140179 Jun 27  2024 ksh.1
        2.26 real         1.96 user         0.28 sys
-r--r--r--  1 mouse  wheel  104862 Jun 27  2024 lex.1
        2.19 real         1.91 user         0.28 sys
-r--r--r--  1 mouse  wheel  69334 Jun 27  2024 mdoc.samples.7
        2.75 real         2.26 user         0.48 sys
-rw-r--r--  1 mouse  wheel  134421 Dec 31  2024 moussh.1
        3.74 real         3.33 user         0.41 sys

So moussh.1, a little smaller than ksh.1, takes over half again as much
time; mdoc.samples.7, less than half the size of ksh.1, takes over 20%
longer.  So, using the largest manpage is likely to give you a
misleading result.

A rough comparison against nroff on the 9.1 amd64 machine indicates
nroff is slower by a factor of about 13, which converts the 26 seconds
from the SS20 into 2 seconds.  This is close enough to your 5 seconds
that I find it plausible that a slow machine could take that long.  I'm
fairly sure a low-end hp300, mac68k, or vax would be at least a factor
of 2.5 slower than the SS20.  (Likely others, too; those are just the
ones I am confident of.)

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse@rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <202611101342.IAA19108@Stone.Rodents-Montreal.ORG>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <> <0ee05dd0-291f-485a-9de7-57f55362711a@bec.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Mouse <mouse@Rodents-Montreal.ORG>
Newsgroups: muc.lists.netbsd.tech.userlevel
Subject: Re: [PATCH] Remove useless warning from man(1)
Date: Tue, 10 Nov 2026 08:42:31 -0500 (EST)
Organization: Newsgate at muc.de e.V.
Sender: tech-userlevel-owner@NetBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <202611101342.IAA19108@Stone.Rodents-Montreal.ORG>
References: <> <0ee05dd0-291f-485a-9de7-57f55362711a@bec.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="30959"; mail-complaints-to="news-admin@muc.de"
X-Erik-Conspiracy: There is no Conspiracy - and if there were I wouldn't be part of it anyway.
X-Message-Flag: Microsoft: the company who gave us the botnet zombies.
X-Composition-Start-Date: Tue, 10 Nov 2026 08:15:42 -0500 (EST)
In-Reply-To: <0ee05dd0-291f-485a-9de7-57f55362711a@bec.de>
Precedence: bulk
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes