git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kyle Evans <kevans@freebsd.org>
Cc: git@vger.kernel.org
Subject: Re: fread reading directories
Date: Sun, 07 Jun 2020 10:05:20 -0700	[thread overview]
Message-ID: <xmqqd06an6wf.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CACNAnaG19QD1PbVS93nFm3XY70CZCrRosmVq-_3j+puAKSPj9Q@mail.gmail.com> (Kyle Evans's message of "Sat, 6 Jun 2020 17:36:58 -0500")

Kyle Evans <kevans@freebsd.org> 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.

  reply	other threads:[~2020-06-07 17:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-06 22:36 fread reading directories Kyle Evans
2020-06-07 17:05 ` Junio C Hamano [this message]
2020-06-07 17:16   ` Kyle Evans
2020-06-08 17:18     ` Junio C Hamano
2020-06-08 19:08       ` Brandon Casey
2020-06-08 19:41         ` Randall S. Becker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqd06an6wf.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kevans@freebsd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).