From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: =?UTF-8?Q?Re=3A_Speeding_up_=E2=80=9Cguix_pull=E2=80=9D=3A_splitting_modules?= Date: Fri, 10 Jan 2020 13:09:51 +0100 Message-ID: References: <87k1657i7j.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:53349) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipt77-0005HJ-BM for guix-devel@gnu.org; Fri, 10 Jan 2020 07:10:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipt76-0007jS-9K for guix-devel@gnu.org; Fri, 10 Jan 2020 07:10:05 -0500 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:34067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipt76-0007gR-2S for guix-devel@gnu.org; Fri, 10 Jan 2020 07:10:04 -0500 Received: by mail-qt1-x82d.google.com with SMTP id 5so1710657qtz.1 for ; Fri, 10 Jan 2020 04:10:04 -0800 (PST) In-Reply-To: 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+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Cc: Guix Devel Hi G=C3=A1bor, Thank you for the explanations. Below, I am thinking loudly. :-) On Tue, 7 Jan 2020 at 21:14, G=C3=A1bor Boskovits wro= te: > > > G=C3=A1bor once suggested an iterative approach of identifying the mo= st > > > important nodes in the package graph that should be moved to their ow= n > > > modules, so that we would end up with a package graph that looks less > > > like a hair ball. I think it would useful to get a better view on th= e > > > relationships between modules. [...] > I was suggesting the following idea: > The underlying package graph is actually a DAG, so by splitting modules i= t is > possible to achieve a state where the module graph also becomes a DAG. > The exact heuristic or algorithm of splitting was not defined. The modules graph (DAG) is already available. :-) Modulo some glue code / tweaks, the tools are already in guix/graph.scm and guix/scripts/graph.scm, if I understand correctly. And note that the commit ddd59159004ca73c9449a27945116ff5069c3743 introduces topological sort -- for another topic: recursive import -- but could be reused /adapted to detect cycles, IMHO. Would a weighted DAG help to detect which modules are in "bad shape"? Other said, mix somehow the packages DAG and the modules DAG? For example, the edge between the module m1 and the module m2 should be weighted by the ratio between the number of packages defined in the module m2 required in the module m1. So then, sorting this edges by weight value, it would give a better view of the relationship between modules. What do you think? We need to detect which "big" modules are imported for "few" packages, righ= t? Aside, a naive question: does '#:select' improve the situation? All the best, simon