URL: <https://savannah.gnu.org/bugs/?68145>
Summary: Performance regression in 1.24.0
Group: GNU roff
Submitter: dimich
Submitted: Wed 11 Mar 2026 06:11:54 PM UTC
Category: Macro package man
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Unlocked
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 11 Mar 2026 06:11:54 PM UTC By: dimich <dimich>
There is noticeable increase of man pages rendering time with groff-1.24.0
compared to groff-1.23.0 in Arch Linux.
For example, results of `time MANPAGER='' man xterm > /dev/null`
groff-1.23.0-8:
real 0m0.356s
user 0m0.523s
sys 0m0.064s
groff-1.24.0-2:
real 0m0.547s
user 0m0.712s
sys 0m0.077s
Further investigation showed that rendering time depends on tmac/ directory
content rather than groff binaries.
Bisection pointed to this commit:
https://cgit.git.savannah.gnu.org/cgit/groff.git/commit/?id=732b07d4998bec1cc942481e7cf4e7287050c40b
Furthermore, with 1.23.0 rendering time depends on input size linearly, with
1.24.0 it seems quadratic (image here).
Following script was used for profiling:
#!/bin/bash -e
outdev=utf8
n=20
result="output-${outdev}.txt"
echo "1 to $n copies using output device '$outdev' => $result"
groff_args="-E -T${outdev} -man"
input=$(mktemp -t groff-test-XXX.troff)
trap "rm -f '$input'" EXIT
{
for ((i=1; i <= $n; i++))
do
zcat /usr/share/man/man1/gcc.1.gz >> "$input"
dur23=$(/usr/bin/time -f "%U" groff -E -M groff-1.23.0/tmac
$groff_args < "$input" 2>&1 >/dev/null)
dur24=$(/usr/bin/time -f "%U" groff -E -M groff-1.24.0/tmac
$groff_args < "$input" 2>&1 >/dev/null)
echo "$i $dur23 $dur24"
done
} | tee "$result"
(gcc(1) man page was chosen because it is large enough and doesn't emit
'an.tmac' tbl preprocessor warnings which cannot be inhibited with '-E' or
'-Ww')
groff-1.23.0/ and groff-1.24.0/ directories are obtaines like this:
$ git clone --branch 1.23.0 --depth 1 --single-branch
https://git.savannah.gnu.org/git/groff.git groff-1.23.0
$ git clone --branch 1.24.0 --depth 1 --single-branch
https://git.savannah.gnu.org/git/groff.git groff-1.24.0
The same behavior is observed with 'ascii' and 'html' output devices.
Additional information:
$ groff --version
GNU groff version 1.24.0-modified
Copyright 1989-2026 Free Software Foundation, Inc. and others
This is free software, distributed under the terms of the GNU General Public
License, version 3, or any later version, at your option. There is NO
warranty;
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the "COPYING", "FDL", and "LICENSES" files in the groff distribution or
package for additional notices and permissions.
programs in constructed pipeline:
GNU grops (groff) version 1.24.0-modified
GNU troff (groff) version 1.24.0-modified
$ uname -a
Linux dimich 6.19.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 04 Mar 2026 18:25:08
+0000 x86_64 GNU/Linux
groff package build configuration:
https://gitlab.archlinux.org/archlinux/packaging/packages/groff/-/blob/9449094bf5e8da8d812d3262d525f7e4cf574248/PKGBUILD#L55
gcc(1) man page used for profiling can be obtaines like this:
$ curl
https://archive.archlinux.org/packages/g/gcc/gcc-15.2.1%2Br604%2Bg0b99615a8aef-1-x86_64.pkg.tar.zst
| \
zstd -d | \
tar -xv --strip-components=4 usr/share/man/man1/gcc.1.gz
Related Arch Linux forums discussion:
https://bbs.archlinux.org/viewtopic.php?id=312537
_______________________________________________________
File Attachments:
Name: output-Tutf8.png Size: 20KiB
<https://file.savannah.gnu.org/file/output-Tutf8.png?file_id=58342>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-5479f0ac3e1f014845fd281c379bc3ccb7a72723.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68145>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
