Thread View: muc.lists.netbsd.tech.userlevel
2 messages
2 total messages
Started by Jörg Sonnenberger
Tue, 10 Nov 2026 10:03
Re: [PATCH] Remove useless warning from man(1)
Author: Jörg Sonnenberger
Date: Tue, 10 Nov 2026 10:03
Date: Tue, 10 Nov 2026 10:03
12 lines
2350 bytes
2350 bytes
On 11/10/26 2:32 AM, Mouse wrote: > 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. Joerg -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: [PATCH] Remove useless warning from man(1)
Author: Mouse
Date: Tue, 10 Nov 2026 13:42
Date: Tue, 10 Nov 2026 13:42
57 lines
3724 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads