tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Improve performance of makewhatis
@ 2023-11-13  1:42 Wesley Moore
  2023-11-13  1:42 ` [PATCH 1/3] Use ohash for strtab Wesley Moore
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Wesley Moore @ 2023-11-13  1:42 UTC (permalink / raw)
  To: tech

Hello,

In this patch set I aimed to improve the performance of makewhatis. On
my Chimera Linux systems makewhatis -Tutf8 is run to rebuild the index
whenever a package containing man pages is installed or updated. I
noticed this took multiple seconds even on a Ryzen 9 7950X system.

Profiling showed a lot of time spent in the loops of roff_getstrn. To
speed this up I made use of hash tables. I tested the changes on several
different systems:

- OpenBSD amd64 in VM
- Linux on Raspberry Pi 4
- Linux on Ryzen 9 7950X

In each case the wall clock run time for makewhatis -Tutf8 -n showed an
reduction of between 25% and 35%.

The one caveat of this change is the roff/while/into regression test is
failing with my changes. I've tried to work out why but I don't know
roff well enough understand the intent of the test nor have I been able
to clearly determine why my changes affect it. I was hoping to get some
help with this.

Regards,
Wes


--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-15 17:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13  1:42 Improve performance of makewhatis Wesley Moore
2023-11-13  1:42 ` [PATCH 1/3] Use ohash for strtab Wesley Moore
2023-11-13  1:42 ` [PATCH 2/3] Use ohash for rentab Wesley Moore
2023-11-13  1:42 ` [PATCH 3/3] Use ohash for predefined strings Wesley Moore
2023-11-15  1:26 ` Improve performance of makewhatis Ingo Schwarze
2023-11-15  8:29   ` Wesley Moore
2023-11-15 17:36     ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).