git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fread reading directories
@ 2020-06-06 22:36 Kyle Evans
  2020-06-07 17:05 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Evans @ 2020-06-06 22:36 UTC (permalink / raw)
  To: git

Hi,

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've read the commit message a couple of times, but I'm really not
seeing the rationale for *why* git wants this knob to be set on Linux.

Unless I'm missing something, this would seem to regress the almost
certainly much-more-common case of fopen() a file and fread() it with
an unconditional fstat() from grep_fopen(), rather than just using two
syscalls at all times (directories and non-directories) and letting it
get rejected in fread().

Thoughts?

Thanks,

Kyle Evans

[0] https://github.com/git/git/commit/3adf9fdecfb0cd31a83ef3af1d8d631a1acd392b
[1] https://github.com/git/git/blob/master/compat/fopen.c

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-08 19:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06 22:36 fread reading directories Kyle Evans
2020-06-07 17:05 ` Junio C Hamano
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

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 NNTP newsgroup(s).