From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 8042C1F55B for ; Sun, 7 Jun 2020 17:05:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726720AbgFGRF0 (ORCPT ); Sun, 7 Jun 2020 13:05:26 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:50036 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbgFGRF0 (ORCPT ); Sun, 7 Jun 2020 13:05:26 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 748E6DE879; Sun, 7 Jun 2020 13:05:24 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=rB/lY3ptm1hWoTYwcmdHviD3BW0=; b=dZRuGp 8jrdSbbhOYZfQQHOJW4kcHWN+rpTze6NVAne5yZsop9AqfBOKtFUejhnTAJmGDem IRjmEhhV5Y0DgsxjsSPlXQAfVIDoSJAI40C3RzrZ+BEkI5P6zcRKyOyxX4NWtj+Q /kUoVvpYU5OoSwtxX+fQ9l+qCOF9agOYYHB4I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=rLWixWdfAolUk2fmB1SAun6B9VIsMURe Sngf5JG99sgDqS+sd6bU8n/Fxt8PNfbU2Gzp6ftvoJwL+1k+1EgUJkE8/3vHodSe BvDawiZrxTgXhKc8LY1lcwASoBE4B3Z+I/vTRcfKmFqUlBd9PL9xxLpCam8stYPe ToOvYPGXx5U= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 6C15FDE878; Sun, 7 Jun 2020 13:05:24 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id B2FEDDE877; Sun, 7 Jun 2020 13:05:21 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Kyle Evans Cc: git@vger.kernel.org Subject: Re: fread reading directories References: Date: Sun, 07 Jun 2020 10:05:20 -0700 In-Reply-To: (Kyle Evans's message of "Sat, 6 Jun 2020 17:36:58 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 125E396C-A8E1-11EA-8372-B0405B776F7B-77302942!pb-smtp20.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Kyle Evans writes: > I was looking at FREAD_READS_DIRECTORIES to measure some performance > differences, then stumbled upon [0] that dropped fread() from the > autoconf test that causes git to use its git_fopen shim [1] even on > Linux. I thought we saw this mentioned recently? I do not recall if any concrete improvement came out of it. The Makefile defines the macro as such: # Define FREAD_READS_DIRECTORIES if you are on a system which succeeds # when attempting to read from an fopen'ed directory (or even to fopen # it at all). So, the macro is expected to be set if a platform gives back FILE * on a directory, whether it allows fread() on it or not. If it is a good idea is entirely different story, though.