From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecXsp-0000KJ-Tt for guix-patches@gnu.org; Fri, 19 Jan 2018 09:43:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecXsk-0000gN-VQ for guix-patches@gnu.org; Fri, 19 Jan 2018 09:43:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecXsk-0000fc-SR for guix-patches@gnu.org; Fri, 19 Jan 2018 09:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecXsk-0007ia-HC for guix-patches@gnu.org; Fri, 19 Jan 2018 09:43:02 -0500 Subject: [bug#29928] [PATCH 0/5] Optimize profile hooks Resent-Message-ID: From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) References: <20180101103336.8613-1-iyzsong@member.fsf.org> <876088m2vd.fsf@gnu.org> Date: Fri, 19 Jan 2018 22:42:36 +0800 In-Reply-To: <876088m2vd.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 11 Jan 2018 23:45:10 +0100") Message-ID: <87vafxvrj7.fsf@member.fsf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 29928@debbugs.gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello! > > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> Hello, these patches make each profile hook run upon its specified inter= ested >> inputs, eg: the 'info-dir-file' hook only get inputs with info manuals, >> install a package without info files won't trigger it. Thus reduce the = chance >> and time to rerun them when your profile changed. > > That=E2=80=99s an area in need of improvements, thanks for looking into i= t! > >> One drawback is 'guix package --dry-run' no longer report the derivation= s of >> profile hooks, and the derivation of profile it reports is not the real = one. >> Addition files will be built when the profiles hooks are run. > > FWIW I=E2=80=99m not entirely convinced by the approach. Well.. these patches modify package hooks to: 1. build all manifest inputs first. 2. filter manifest inputs to get interested ones. 3. run hook with its interested inputs. I think reducing the inputs of hook from the whole manifest to its interested ones is the only way to avoid unneeded reruns. > As discussed earlier, I=E2=80=99d like to experiment with a notion of =E2= =80=9Cbuild > rounds=E2=80=9D: the first round would build a profile without any hooks,= the > second round would, depending on what the profile contains, rebuild it > with certain hooks. I think "build rounds" would improve the UI/UX, and by changing inputs from manifest inputs to a built profile, it would simply the current implementations of profile hooks, but it won't avoid unneeded reruns compare to the filtered interested inputs way. Is my understanding correct?