From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EP71KPD7/mSb/wAAG6o9tA:P1 (envelope-from ) for ; Mon, 11 Sep 2023 13:37:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EP71KPD7/mSb/wAAG6o9tA (envelope-from ) for ; Mon, 11 Sep 2023 13:37:20 +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 4B93661670 for ; Mon, 11 Sep 2023 13:37:20 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=NTW26kTg; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694432240; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=c75Uof06ZV2yQGrk519SMNLcfsI9N4V3YqlzH8kdh7A=; b=RpzKPzX9T0aK+rr8AsJZqX9CkCJ+MHKFEM4wtzm420Tg5zNch+wblR/86+pwwivpwWH5cU zm3ePld9PuIdhttDdVKMUxKKZsMllriBeqWbXardpgsDFVbXbMoecC6mFBMeUb670+Gsht NaCkzWodtSXTTlcsTV9beKH9tgDMKcUOi30KLXaEQDr+WEYXMvBvg8pDIrW5+9d/uelVfy CFZ9Sx2zHEOs0DnvnjzbWeKnG1l5/9o57bj3dgO6DYZs8zTIHDK38fmikGSA1x1ttkGdR1 gOJ4RCS5xfWXQrzdgLlmCl+SLgnybeMMZpVfa/JkyqrBcMAHjxz2LkOsNnoqCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=NTW26kTg; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694432240; a=rsa-sha256; cv=none; b=fcSsAOtysq5JiA21spSOe3LfkJM7qNy2BoysZgBzt3ZY4M7Fy1+7NLVSqA/aSYcAqscOS8 NbzTziL8Y8PgigvovUcSQdVYuUjl7w2eL36Z7/E3WFBduBe9NxV/4ShwoNxIFYNiH6aOdn VxJYUQtihSLLfz/4e0IL4O9VlqpyY2TsFPL93ACCqsAWuL03LCxy32zn3Hv995A6Rj1l7n y9QxD1xf8JV9gx9SvzKAcsbJeEhVHLI6gQGZ1CcfLI8obRR7iFiil/okKIURtp+UoVMxfo Mk1FUUrUoyT75gjCOWpGw12kd4U+r/r2+jDgNg6yCyG00+Sm6oxVxXej0wlPdg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qffDx-0002g6-QM; Mon, 11 Sep 2023 07:37:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qffDv-0002al-2s for bug-guix@gnu.org; Mon, 11 Sep 2023 07:36:59 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qffDu-0000p2-R1 for bug-guix@gnu.org; Mon, 11 Sep 2023 07:36:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qffDy-0001wQ-GN for bug-guix@gnu.org; Mon, 11 Sep 2023 07:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65787: time-machine is doing too much network requests Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 11 Sep 2023 11:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65787 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 65787@debbugs.gnu.org Received: via spool by 65787-submit@debbugs.gnu.org id=B65787.16944322197453 (code B ref 65787); Mon, 11 Sep 2023 11:37:02 +0000 Received: (at 65787) by debbugs.gnu.org; 11 Sep 2023 11:36:59 +0000 Received: from localhost ([127.0.0.1]:52252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qffDu-0001w8-L5 for submit@debbugs.gnu.org; Mon, 11 Sep 2023 07:36:58 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:39078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qffDo-0001vr-Rh for 65787@debbugs.gnu.org; Mon, 11 Sep 2023 07:36:57 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-402ba03c754so12800735e9.0 for <65787@debbugs.gnu.org>; Mon, 11 Sep 2023 04:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694432203; x=1695037003; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=c75Uof06ZV2yQGrk519SMNLcfsI9N4V3YqlzH8kdh7A=; b=NTW26kTgvSqUy5VcTIPkcCulVW5giHsceKOGWFtWgG8fFHIMQjzMLiJtrOUEn+Y7sL 7Kfm9lS/iYtjT/TFVe+pVxumO0rgIYMMjkxNEr2j1MBCYTZby9nNFCY+uVE4Abo29ARv tr+7+tN+d4dQmfI1bfPeCzBdHBmxmdrhk14tq6rGHraapQ6bjgdcv6wxViSLOjKFRMHT yUhR8EZzQf+KQz0+tYcrn1C+/k6HyXI+VOf7uzXhINyJtzcw4+Fw17SCTZhYdqiynSib xE+vpL43THUcYxIbEf2OyJy8LkUx5fCBhnZ/ryokBk3NNzAd+L8KLZmEAoVKlgGd1Q5Z fbHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694432203; x=1695037003; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c75Uof06ZV2yQGrk519SMNLcfsI9N4V3YqlzH8kdh7A=; b=tJcUhi30muCbzhheXN2092fKvCymz8t2rA8G9oT5BhVd0zYQoGP1rHbVXwfD4rUsb4 JctnUx49kSL29HFvVBD/BDz3YcKMpsuJf4m8VhQb7AOhJQvBn8Ui8aellPvVxtq2Vr0q Pue5T84wLwqPLhyHz7S1Oer89sa0v/2h7F/YatREg/KLoI7VJ2LC5XV3ALODM3lxJBtO ZmUVr/QcDAdN834CuM76Xcv2aEt1h/s5g+wewMunSJMlinLEE8XPXf6MrkpmfnFPoGSZ qa7nW8FImYd/5d19Fg/zwNztQpxL8cf1pr0TvzMqaMIxKxfXFN8kkTmJVGYwxkT2NffV Utsw== X-Gm-Message-State: AOJu0Yy5Wh+oay1BITUBWaSrKFNUe0kjCtesauOqJ0BRY3iE9fhbZgk1 uTxrqfD72QuKrnDVGX8r+FyYO6cHtLQ= X-Google-Smtp-Source: AGHT+IEkzDfx0wBZh0HmDcBS2g22X8JMnLvYGiqOrZObIsOfxO0up+ji6KlH5AczM6WHzTmdw7IJjQ== X-Received: by 2002:a05:600c:350a:b0:3fe:dd78:8fbc with SMTP id h10-20020a05600c350a00b003fedd788fbcmr8519273wmq.3.1694432202717; Mon, 11 Sep 2023 04:36:42 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id n12-20020a05600c3b8c00b00402f713c56esm9859300wms.2.2023.09.11.04.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 04:36:42 -0700 (PDT) From: Simon Tournier In-Reply-To: <87tts1jbbx.fsf@gmail.com> References: <87wmx3mfo5.fsf@gmail.com> <87zg1tvlfn.fsf@gnu.org> <87tts1jbbx.fsf@gmail.com> Date: Mon, 11 Sep 2023 13:36:40 +0200 Message-ID: <874jk1j60n.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 4B93661670 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 5.78 X-Spam-Score: 5.78 X-TUID: n8hiuaFqfUyF --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Oops, missing diff for clarity. :-) On Mon, 11 Sep 2023 at 11:41, Simon Tournier wro= te: > If yes, here two examples: Adding =E2=80=99pk=E2=80=99 where =E2=80=99remote-fetch=E2=80=99 and =E2=80= =99branch-lookup=E2=80=99 are called. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=p.patch Content-Description: p.patch diff --git a/guix/git.scm b/guix/git.scm index 1cb87a45607b..0209826c5c00 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -234,8 +234,10 @@ (define (resolve-reference repository ref) (let resolve ((ref ref)) (match ref (('branch . branch) - (let ((oid (reference-target - (branch-lookup repository branch BRANCH-REMOTE)))) + (let ((oid (begin + (pk 'branch-lookup 'NETWORK) + (reference-target + (branch-lookup repository branch BRANCH-REMOTE))))) (object-lookup repository oid))) (('symref . symref) (let ((oid (reference-name->oid repository symref))) @@ -483,8 +485,10 @@ (define* (update-cached-checkout url ;; Only fetch remote if it has not been cloned just before. (when (and cache-exists? (not (reference-available? repository ref))) - (remote-fetch (remote-lookup repository "origin") - #:fetch-options (make-default-fetch-options))) + (begin + (pk 'remote-fetch 'NETWORK) + (remote-fetch (remote-lookup repository "origin") + #:fetch-options (make-default-fetch-options)))) (when recursive? (update-submodules repository #:log-port log-port #:fetch-options (make-default-fetch-options))) --=-=-= Content-Type: text/plain Cheers, simon --=-=-=--