From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1B002D3725 for ; Sun, 21 Jun 2026 23:17:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782083867; cv=none; b=PlzDeKnI2QdA8yk6lzCofLaK9Rb6kog61flgOnoa4khzj6WZICSZkrDBRwBhFR44TkQSJYBlTlXZtJ9jLZ1bLHvEvEzAp0cw5N51JnPjQzpNNfktG3X+g1DFEifv8cBVedS8YglKUiHNk/bZ8DApGYhUn7hyQGw6wXUsTzAG7kI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782083867; c=relaxed/simple; bh=UkSFCkWwFgB/GLc1R366cRYCgDyVTF60LNjxCGMS0Wk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tQjC4uIkSscEc6X67n6E+j0D8shb8y8S7X7fh98lZ+Sr8L6Ct8tx/ojI94b7shS697J6qI9FoVTtZzbqqAokyhvK2RjKVp8bg6g95EadTXcJ8d4K0AGNbVeViQw/zqGJVE5fOF3sSb+ZSkZp4A+WTirtMT3RCVQdJ/eEItNwl5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=Tyq0CpsB; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=WPoGjkOQ; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="Tyq0CpsB"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="WPoGjkOQ" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 04A5514001E5; Sun, 21 Jun 2026 19:17:45 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-05.internal (MEProxy); Sun, 21 Jun 2026 19:17:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1782083865; x=1782170265; bh=fSszHKx6Fo uqjrPEpmFnpnOW8zpsKxWJXjgoBFe0Bo8=; b=Tyq0CpsBnMPGy2rgsKtKGLibjI KIJsh/Lp4MQlCmB0u4etV4j97BrCPvoWURSkcKtVMDooAIVu+qXojK+I54GjXRiT GuYFALmpI1DR119B/HDcRYeAdWvkVq8kmX/B2voDieT3UwFtuZ5JqiLQKiPSjLhu 6kfJwkFxPPiNWfxrcVn2qWfqFKMMKxbK4pv45kJQrewopi8779KjYZceunCMXJLX 9Fm/DsE866Bqxv4AEvwF61wzlE3RIEefXM5OgHYTs3tYYOgLRjqqZGm1srhKMnRj G3p5DFgnWdxsepO46X1gFbGVxp+gU82y7kUXMJHtpw2REWjiAfbGg8ZEyYMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1782083865; x=1782170265; bh=fSszHKx6FouqjrP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+1ItPwCkHXi+3sEgl/2/szhTg X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 21 Jun 2026 19:17:44 -0400 (EDT) From: Junio C Hamano To: Jeff King Cc: "D. Ben Knoble" , Git Subject: Re: git-diff in a worktree is an order of magnitude slower? In-Reply-To: <20260621212805.GB2297179@coredump.intra.peff.net> (Jeff King's message of "Sun, 21 Jun 2026 17:28:05 -0400") References: <20260609001134.GD358144@coredump.intra.peff.net> <20260611085526.GL2191159@coredump.intra.peff.net> <20260621172432.GA2206349@coredump.intra.peff.net> <20260621174518.GB2206349@coredump.intra.peff.net> <20260621212805.GB2297179@coredump.intra.peff.net> Date: Sun, 21 Jun 2026 16:17:43 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jeff King writes: > But at the point that we are comparing nanoseconds, I don't think we > even need to bother with the delay. It takes maybe 5 seconds to write > out all of the linux.git files and then the final index. So ~20% of > those files will have the same timestamp as the index. With nanosecond > resolution, we'd expect that to drop by an order of a billion. Even if > we get unlucky and have a single file with the same timestamp, that is > not so bad. > > The code to do the nanosecond compare is already there! But it's gated > on USE_NSEC. So this (plus a bonus debugging trace ;) ): > ... > if (!changed && is_racy_timestamp(istate, ce)) { > + warning("%s is racy", ce->name); > if (assume_racy_is_modified) > changed |= DATA_CHANGED; > else >... > makes the problem go away. I'm not sure if I'm missing some case where > we could be bitten by the problem that led to making USE_NSEC > conditional, though. That's cute.