From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KIhjBa1DOmDVVgAA0tVLHw (envelope-from ) for ; Sat, 27 Feb 2021 13:05:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oBMjAa1DOmD0GwAAB5/wlQ (envelope-from ) for ; Sat, 27 Feb 2021 13:05:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1503B1EF01 for ; Sat, 27 Feb 2021 14:05:48 +0100 (CET) Received: from localhost ([::1]:49900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFzI3-0007Z9-9X for larch@yhetil.org; Sat, 27 Feb 2021 08:05:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFzHq-0007Z1-B7 for guix-devel@gnu.org; Sat, 27 Feb 2021 08:05:34 -0500 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:39808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFzHo-0002Gj-5R; Sat, 27 Feb 2021 08:05:33 -0500 Received: by mail-qk1-x730.google.com with SMTP id h8so12008510qkk.6; Sat, 27 Feb 2021 05:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=eCxO0l8ZK0R4Ma486nD0B2akCTOQ6cO9e59zo/qx+yU=; b=sxP8Gj/hHKO5rlO9oYBod0qzDpQUkVl0FQxsmVzwXBKAp+j+UKIwZOjrwe6/Lu1nJ1 o1gLjXAr850X1F8MHq9lhbYgW6GLZNz9B8gRBB2ELdlyBN/DjDL2QijIaIMShpPpOY03 mXhM/hoXpyNOcyRPPKNFRMTeHf9PNM/tZy2I8X7Doh3Uas7FC/5dCzSXIvjoCWYlpWL/ dph+nxvu0lGXcaPZDYrGVs7DVeNwbdYbo6YrZTzqHwfu+BGwPsUUpZbj8ykbbvT9NW4d +tWZQxbRJVCrR/ilnU68RYa+kUT+r2ULeRS0b0pku6WEKGwyUpy5ynZhVGu4YN04jfwE bcKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=eCxO0l8ZK0R4Ma486nD0B2akCTOQ6cO9e59zo/qx+yU=; b=kXq8wVwq8SZsifyLhbGUWiEsbUkGxrxv1SmtvWkSI66WQJ6UGFCMav1Rak8nIinkMa 3AxpRwsEb7P/doVApQQzpL8G9sMOsmtivB6plcLWDvgPCiB2LebvsPKPchbdXHHc0JwP rBq23nZH+ngZSaSxGU4ov5f7jVLc8cY17c9anzfBb5FBfepwAgMW33v62DO2BkCVUuEZ GtgdFaQLXnBAa7HKqbsWYgo1LcaoQWkTq4YwZ5aFNyrl/A+LbMejYlCiuDerm31ekhvp 5rjK902PjCKugljrEwxPUsd0u7L+ZQv8MRrrYGs/QhRhypGb93q1/6I08TxQVYqaoZFl OwzA== X-Gm-Message-State: AOAM533P1w6EkfZtyiyp+y8ALJ13cTAL9tXOLgsfAN7fQlNFqwaE4nob 7MLRz3cd2gNCr4FyH/Q9TZbR1cVur4+LIg== X-Google-Smtp-Source: ABdhPJzBF/FCo6w+jtF3qFRMnJ6Ja5QrR4rrN8fecwaTNPGjuR/sibn4Wygi8LwvDOEiOmvZwJmt9w== X-Received: by 2002:a05:620a:cef:: with SMTP id c15mr6879320qkj.355.1614431130027; Sat, 27 Feb 2021 05:05:30 -0800 (PST) Received: from hurd (dsl-10-134-178.b2b2c.ca. [72.10.134.178]) by smtp.gmail.com with ESMTPSA id 12sm7692077qtt.88.2021.02.27.05.05.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Feb 2021 05:05:29 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Getting rid of the mandb profile hook? References: <87k0tw3y15.fsf@inria.fr> Date: Sat, 27 Feb 2021 08:05:22 -0500 In-Reply-To: <87k0tw3y15.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Sat, 05 Dec 2020 19:31:18 +0100") Message-ID: <87v9ad7jal.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::730; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x730.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614431148; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=eCxO0l8ZK0R4Ma486nD0B2akCTOQ6cO9e59zo/qx+yU=; b=GIazg8WaD2u+xXgIIdp85cpbqFZHYyssSReoufXDx1Txhd6Tz6ifqagDvxqc8cHOPiZtAN gSPGVwWqlxmzZyQWPactcXrSUkkRCVWd4f7VddwPLc31qel4TvFnMYxaeK2u1YTODq7VgQ kJYPN49KyXBqd1DwAntBf+mA9YW9cRb3qCVYx42XVoK1pobH0S6vfRZoCeyvLOub694hNt htFXZoCEC3b7LU4JFO7jFH1IOwQoIX0aQolPGjiBtZIVRAsOAe8kvsi/D501FSHluFEpAj tTmwguSmSyNFesEylUGqzu76TV/svlUGTP22w0/Iffh6j4e/xPADIKfT0/Gu6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614431148; a=rsa-sha256; cv=none; b=EiLf7+IWECMsUa1PIxFB2GabPDOHJiWItG7XzJOt59PvQ6s6FaWyH3T1SFFgIRSyWIOk+L 6LaFajE1h7NBQqlDp9sN3Uv/ApW7K7Nahugjv6dXzRZrQ+kACarvgb/KzIfH+ac8U0c8P6 Cv/5EJ2EUcIaI+xlpXVeh9H0oKGyf+4HD6hDX3RNeu04ro2dOr/RnhM4wybUCFAavOloBq wGYPd8ZL0o+OSysLwIQEMvl1yzg3QEwLFXyxRTu+Vx8Wo//vOrLACbivNfiiCgHrgpLx0P yIP+/umDRVeFeI5nBRR5VUal0dgiYbIXPpWdHSwVeLJ2gKP2Qbn5nQsiNIYP5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="sxP8Gj/h"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -0.57 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="sxP8Gj/h"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 1503B1EF01 X-Spam-Score: -0.57 X-Migadu-Scanner: scn1.migadu.com X-TUID: znkMyIKw6lXe Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi Guix! > > I was inspired by Michael Stapelberg=E2=80=99s talk recently shared on IR= C=C2=B9 > (well worth watching!). One of the takeaways for me is that many > actions should be done lazily, in particular populating caches. > > =E2=80=98guix install=E2=80=99 & co. spend a significant time populating = such caches, in > particular the XDG caches=C2=B2 and the manual page database (mandb). > > I=E2=80=99m thinking we could get rid of the mandb hook. However, the > functionality matters IMO (we need good tools so users can browse local > documentation; mandb is not that good but better than no search > mechanism.) Here are several options that come to mind: > > 1. Provide a =E2=80=98man=E2=80=99 wrapper or modify the =E2=80=98man-d= b=E2=80=99 package such that > the database gets built on the first use of =E2=80=98man -k=E2=80=99= , unless it=E2=80=99s > already up-to-date. That would mean the database would live in some user-specific writable area of the file system correct (where?), right? And could use the common 'update' mechanism of man-db to make it as fast as possible. This sounds good from a performance perpective, but could introduce cache issues every now and then (if man-db changes a lot). I wouldn't expect much problem given how mature man-db is, but that's one thing to consider. > 2. Add a phase in gnu-build-system.scm that creates a per-package > database. Change the mandb profile hook such that all it needs to > do is =E2=80=9Cconcatenate=E2=80=9D all these GDBM databases (which = should be much > faster than browsing all the man pages as it currently does). I like that idea better, but I don't know how feasible it would be. > There are crazier option that came to mind but let=E2=80=99s ignore them = for > now. What is taking so much time anyway? Why is generating this database so compute intensive? I don't grok why it should be so inefficient to scan a union'd tree for expected prefixes and append a bunch of file names together. > Thoughts? :-) Lazily doing things seems a good idea in general to make the experience more snappy. Thanks for looking into it! Maxim