From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 23858 invoked from network); 13 Nov 2023 01:44:00 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 13 Nov 2023 01:44:00 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 6d67912b for ; Mon, 13 Nov 2023 01:43:56 +0000 (UTC) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 18e11405 for ; Mon, 13 Nov 2023 01:43:56 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1CF2C320051E; Sun, 12 Nov 2023 20:43:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 12 Nov 2023 20:43:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wezm.net; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1699839834; x=1699926234; bh=cKzIhyByF6 Gc6+HkFD2bjQSBtA8xYDVDCD1Wz81gQ5Q=; b=Vl0PFmUUxzq1RnenXXBNg5rZfg 56IQ4nccBiaUjptYEfw0DuUcoc0d4KobukFVHfu0+KF/c6MPEjD59cVq2sEGFJ9q E+R3W4jvQD3KV4gaA4E739yBF90Yzvw6MBGEJxRa2wOTCGpxcg4p29sRqgtkoGb+ 6G6D1fy6mKoSVNNlBowUNuHRGBu4xE0lMmyWT0Lnu4+sqO34PpUrMFdeqELMa+AX /dURPxIzGkHL6zdUqzuoz6UvJEU29RPzIx609M6W/hKCqfDVcEaMduQ3vUx0VqDa 5+VZ2Ma3T+Bib18cMXbq9k6YlPUJvbdQM6O0tknqNWpNN/hFaFv7h+0wTqtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1699839834; x=1699926234; bh=cKzIhyByF6Gc6+HkFD2bjQSBtA8x YDVDCD1Wz81gQ5Q=; b=Cl4s9YMyPkAI8S/mkUVh86LortEcIx5WZezE1z17pcXz xZMnY7W7C9HiJeTUSePqrWa0q+Fpiy6GuZjWmsIzBZr9L8H6PPy2S1FT+3ovmBiF SSv0AnoRv8NZLDjxBYnlp9PSGl3NFIrST0DWT3Hb9xAmmc8KrJpiYrpGz2H/LJOW T7gV8h0NGy990ObEm5201m42EAB+1WxYPINeBwQYRJoAq8CY4f3Yp1LzWifTOpuo 6gmsIsHJJsc5rl2+z4Eht0kVt/zag6hoq8ZEQveyjHF9ebRngl2PZCV1ROFmUzTx OMrSH5iks10YpV96C9fwsWQ7HsgezOSljzugA+++xg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvledgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhephggvshhlvgihucfoohhorhgvuceofigvshesfigviihmrdhnvght qeenucggtffrrghtthgvrhhnpeffteeftdfhjeejgffhiedvkedttefffefglefhgfeuje efudevueffkeeiuefftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpeifvghsseifvgiimhdrnhgvth X-ME-Proxy: Feedback-ID: i0dbc4144:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 12 Nov 2023 20:43:52 -0500 (EST) From: Wesley Moore To: tech@mandoc.bsd.lv Subject: Improve performance of makewhatis Date: Mon, 13 Nov 2023 11:42:42 +1000 Message-ID: <20231113014330.2247710-1-wes@wezm.net> X-Mailer: git-send-email 2.42.1 X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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