From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CKCjNr44dGLmqwAAbAwnHQ (envelope-from ) for ; Thu, 05 May 2022 22:51:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2HDBNr44dGLdfwEA9RJhRA (envelope-from ) for ; Thu, 05 May 2022 22:51:10 +0200 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 73C56376A4 for ; Thu, 5 May 2022 22:51:10 +0200 (CEST) Received: from localhost ([::1]:49242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmiRJ-0005kV-LE for larch@yhetil.org; Thu, 05 May 2022 16:51:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmiR0-0005iP-AM for guix-devel@gnu.org; Thu, 05 May 2022 16:50:52 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmiQy-0005Af-G0 for guix-devel@gnu.org; Thu, 05 May 2022 16:50:49 -0400 Received: by mail-wr1-x434.google.com with SMTP id i5so7557773wrc.13 for ; Thu, 05 May 2022 13:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=h1716dtVllVkvmkDrb7hx1T1vwQL/28DjTrGYg+Qefs=; b=MlSI8yIjfRKgHpgqt0alretIoAiHAe3KbtvVi8u80YUVZOFlqsErV8u9v+oecgh+CG nxEnfGcj26TBE0tTJN0DjhTiTpm8Qe64QFIZ3+S6HWySC2j+7dYX3rsmhLoDHSrPKKVQ DWUKsCwp6sikOZG6wLP+gCOoPsjxsLDnjHMMg0xfRmQOevZ+1ZmXthxE2ZDthRxw2cgd rVQYCgnMFEfnj0h78Vx0EW4Q50ZWme5f6hT8xbCKH9XOjgaMLmUT6Xklo8uB1iw00FEe ucwZOqgYMh8w/MgoTjUnpENjUCqAwaO6jfDs1bzA+/3yAw7s+Dngc62G/goGKOnU4UiY 3I4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=h1716dtVllVkvmkDrb7hx1T1vwQL/28DjTrGYg+Qefs=; b=7Mffplvcz+LnQu+BjBMjpk+4JSRo/y3D0HDUT8QSoTYMCDca7VKiEAt666I2Xo2Byk hhZijfKV9KAVv+lHorOOpwsxWt4rgdpz70LYutYIN6RQQkwxDEAmUZklRDugWtJC5U45 PWN85PZ2gEICedwHKNHJMG4fnH3njFLyucIGoSeicEkv28yGZXcKG2Mk+TvHNeYI9pkX uzZVnGvDcCVEu2cYgKaewG8fkFLVnD0PP5u1YSo9VKCUqIr6n6rGzUG7xj4ANgmQ99DJ GZ4TEXr0rIN4/f8+bkTp3YbIIT8JyefNR74s9AIVsRNNtGAXfPQA5QmLkQxtRhj8Gsw7 HMyw== X-Gm-Message-State: AOAM5317AkW9tWR9t58fER39yOca+vioaXtTmK3vp/BsaGXHfowbUMs8 flHdm07I2O6qkUK6upPihsCPIZxbUYM= X-Google-Smtp-Source: ABdhPJzuOEDQI/uKO1WbsNH5XHytbC8XnEdN0gGCM14cSTlC3cED3AowOi4+qwwXtzH9ZdHa2hGsnw== X-Received: by 2002:a5d:64a1:0:b0:20c:4f4b:416b with SMTP id m1-20020a5d64a1000000b0020c4f4b416bmr21878026wrp.181.1651783846542; Thu, 05 May 2022 13:50:46 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id bg19-20020a05600c3c9300b003942a244edasm2317598wmb.31.2022.05.05.13.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 13:50:45 -0700 (PDT) From: zimoun To: Liliana Marie Prikler , Maxime Devos , Andrew Tropin , guix-devel@gnu.org Subject: Re: Multiple profiles with Guix Home In-Reply-To: References: <8735hqvh4a.fsf@trop.in> <8a42a0c84d35231b360a421fe0b846c8e1aa3d2c.camel@gmail.com> <8b66e609b7c9d5183017ccf7fef47c818fcea231.camel@gmail.com> <25e0ca9be4053c94d12461ec42f1985cd6730a8f.camel@gmail.com> <07907034239128b36890690703fe6cb6b4ce958e.camel@telenet.be> <53eabd93a0e41723ad3e0238314e630e713f8cfe.camel@gmail.com> <4bb446ca24b57f648d1dd4f0083010d9ee35c40f.camel@telenet.be> <28dcab6db488b73a95bfe349a3e97a3f4f5ec345.camel@telenet.be> <330265fe1014a4015dc64ec645f6c1171771b1df.camel@gmail.com> <03221fd1743fb50325dff2604f7b4fc3ae450c1b.camel@telenet.be> Date: Thu, 05 May 2022 22:50:42 +0200 Message-ID: <868rrf66vx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x434.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651783870; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=h1716dtVllVkvmkDrb7hx1T1vwQL/28DjTrGYg+Qefs=; b=Zua9Ua0cep/rAAApnaAVqak2CsbU/9EDaGN1SJm+OVAlxxDqKwn8JgT6lCOOsRS2ccs5UM v4hQf2SiU4idfuI9EXM7srDrz8Qr0khSHM3veKtqgVUMxBpVICiVmEf32jb0wyN58tpbi3 8vM5CRt4T2U/SdV15QR78+FAt4Y/D5p5iF4gWJMPZZOKDAa55dOsVb4xFTFy+DNdDhqGjQ TU5BOaFboZyhHm4cMEuRQy0sCvQ08TUep8fO50l2tAAsFLNw3LaDvCI/2Fim2rHX4sUCq4 8sRc81Zrz7ZCINGHNy93O5zYCL3AWSqWoZK/Y4LKMFrAvzKa1eaWU7BRklvSNw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651783870; a=rsa-sha256; cv=none; b=NZok2XYBjCIXxjctq6I7gd8UwF5I0Lypr1taT+kk5o0t3mY45s12aq/wbi4oPcVeX/8oCq KYaV1P/qC/zQwSv2J9Yz744ixr1qOhXx20QFBVvle2RzbOGd2pkk0uMPL00e6jM22oPuN/ 3tr5uSjdYOMOGsElNWnk2gSy+YPwcly+gkYzYgdibIiBzZ+5wr/RJ8U/LZnDTbmch0/VlF LZN1UWBSQL3Pri+qezhXUJf2NJeLCqgaluheU24c/3E+BLOVCKtS4OtdoB2ZNXVi5sJ/BS +cbjtlbH8UCs3rM6ljulF0WPXKhcR/p8R/cBuZjLlRnzNB+ZV13BERMu/NICUw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MlSI8yIj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MlSI8yIj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 73C56376A4 X-Spam-Score: -2.49 X-Migadu-Scanner: scn0.migadu.com X-TUID: /xoq3X0U1zTm On Thu, 05 May 2022 at 21:08, Liliana Marie Prikler wrote: > Am Donnerstag, dem 05.05.2022 um 20:00 +0200 schrieb Maxime Devos: > >> That's one method for faster builds, but you'll get even faster >> builds by also making union-build O(n lg n) instead of O(n=C2=B2), and t= he >> latter optimisation will help everyone and not only Guix Home users. > > If that's what you want then go ahead and improve union-build. Unless > you add some serious waste that eats up thousands of cycles if supplied > with no more than three packages, I doubt it has any serious effect on > my analysis that small n =3D better. > > As for the complexity of the actual implementation, I'm pretty sure > you'll find it to be n log n in most cases, but I also fear that there > might be degenerate cases in which the fact that we're reporting errors > at all leads to a worst case lower bound of O(n=C2=B2).=20 > >> And the O(n)=3DO(1) doesn't seem quite right here to me -- individual >> profiles will be smaller and hence faster, but there will also be >> _more_ profiles.=C2=A0 Maybe if you sum over the profiles, you'll get to >> O(n) instead of O(n=C2=B2) (where n =3D number of store items in the >> profiles) > Again, k(n log n) <=3D nk log nk, for k >=3D 1. Well, I am not sure I understand all the debate here. Again, without concrete timings, the discussion is purely theoretical. And from my experience, the update of several profiles at once is usually much faster that an unique big profile update. For sure, the situation is improving with recent work, but still. Maxime, assuming the user has {n_i} packages for i in {1,..,k} profiles, i.e., a total of N =3D sum n_i packages. If the installation, update or any other operation on one profile has the cost f(n) for n package in this very same profile, then the comparison becomes sum f(n_i) vs f(sum n_i) and thus =E2=80=93except special cases for the =E2=80=99f=E2=80=99 cost=E2= =80=93 considering the most probable non-linear shapes of =E2=80=99f=E2=80=99, multi-profile is always = better. (Note that this =E2=80=99f=E2=80=99 probably depends on the set of packages= , so it is even more complicated, IMHO) Now, assume the user has, in average, n packages per profile. Therefore, it becomes, k f(n) vs f(k n) and if f(n) =3D n log n, then it becomes, k n log n vs k n (log n + log k) and thus, Liliana, in this very specific case of complexity =E2=80=93 proba= bly not the real one =E2=80=93, the pragmatical question is =E2=80=99n=E2=80=99= vs =E2=80=99k=E2=80=99 vs the hidden constant (for all the IO). Again, I miss the debate. :-) Cheers, simon