From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (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 9BDD222259F for ; Thu, 11 Jun 2026 17:38:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781199490; cv=none; b=Bpv03x00KopWNvg+6gkMGRBoil+723848Laj2An47iydsBQDo+YJz27xB2vNMpc3X80MytEN9N4oDos3PR55hd+VVnkwsbRfSlY/SP6QdmQOK9X4M1jjIgxoyNHzJo64Cz02l+Usk4ZlxBI1BjlOpzeTu3/8a9YMeJuRQ0joVD4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781199490; c=relaxed/simple; bh=qQITY4li40BRP/9L30RP8Q3TgwsqE34EIIoUOKaNc/o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=i9FSoBGapoTG99/hoL4b5fwwpJVcINb1nJSyqDA+uR4ujXnJ39jbC1pepdkE9vXDGIBJl8igBdiW6ji4nUktt9ePFj/zq+8cJ0s5ZUelrXu5n+cjPPbbG6dtPor3ce5RKvryAzzmpRjHN8Rw4pMtwNrtbjnOijVoIgR/Qdh6fSQ= 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=csCYbSE2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=YSx7Z5nD; arc=none smtp.client-ip=103.168.172.154 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="csCYbSE2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YSx7Z5nD" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id D98471400123; Thu, 11 Jun 2026 13:38:08 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-04.internal (MEProxy); Thu, 11 Jun 2026 13:38:08 -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=1781199488; x=1781285888; bh=qQITY4li40 BRP/9L30RP8Q3TgwsqE34EIIoUOKaNc/o=; b=csCYbSE2PWyifX7wt6P3gUSxD6 8oHPI3qMZxPkrHF3HhjgCgR79XS2mG1MGr6yN3IhBO+HaHu56D56bosi/gj7Cfds proDjuKrdDS+OEAohIw/lFXaD/stTi3NlaWmr/nbQ2s/wCDiJnUvkVAiymS8xrVo uLtfLfUPsvQgeEzr0bDCTW3b7H3HLvMScNel+axYaHHzhsX1t8nh/85ZpCBcuDxf BteFylx362JSP3UwE/fcjnD3fCeVH0pCIeXYloFITFooR02e9NJk/qj25ce73DNL 8F8IDG04Z+nCI2/CGA/VjILzJhP9E/oCWwZZw59Q7qW0S4eGHN9yjhyeXoIg== 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= 1781199488; x=1781285888; bh=qQITY4li40BRP/9L30RP8Q3TgwsqE34EIIo U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pVtAB7ii0t83D6qOtL0smQ X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 11 Jun 2026 13:38:08 -0400 (EDT) From: Junio C Hamano To: Jeff King Cc: Tamir Duberstein , git@vger.kernel.org, =?utf-8?Q?Ren=C3=A9?= Scharfe , Patrick Steinhardt Subject: Re: [PATCH v2] ls-files: filter pathspec before lstat In-Reply-To: <20260611084132.GK2191159@coredump.intra.peff.net> (Jeff King's message of "Thu, 11 Jun 2026 04:41:32 -0400") References: <20260608-ls-files-pathspec-lstat-v2-1-fb734b28422e@gmail.com> <20260609104119.GA1509396@coredump.intra.peff.net> <20260611084132.GK2191159@coredump.intra.peff.net> Date: Thu, 11 Jun 2026 10:38:07 -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: >> Yeah, absolutely it's arbitrary. The simplest answer is that others >> are welcome to bump this, provided they make the case for it. > > OK. I can live with, I suppose, but I am tempted to say that it should > just kick in always (i.e., removing the pathspec.nr check). Yeah, that is certainly simpler, and this ... > Though I did show a case where the performance regresses, it was pretty > made-up and not something I'd expect in the real world. And you'd see > that same crappy performance with "git ls-files -- $(git ls-files)", > without the "-m". ... makes it clear that "trigger only when there is one element in the pathspec" is optimizing for a wrong case. I think we want the log message document that this kind of thinking went into the final choice of the heuristics, like, "trigger only when there is one because ...", or "even though it would actually be an anti-optimization when the pathspec has enourmous number of elements, we always use this optimization because ...", but as long as that is done, either solution is fine. Thanks.