git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] add GIT_FAST_STAT mode for Cygwin

From
Shawn O. Pearce <spearce@spearce.org>
Date
Sep 24, 2008, 15:02 UTC
Message-ID
<20080924150231.GO3669@spearce.org>
In-Reply-To
<81b0412b0809240742g2918b300h9114579c4ebf05b4@mail.gmail.com>
Alex Riesen <raa.lkml@gmail.com> wrote:
Show 8 quoted lines
> 2008/9/24 Dmitry Potapov <dpotapov@gmail.com>:
> 
> > Frankly, I don't have strong preference here neither for making this
> > fast version always work nor leave it conditional (perhaps, with the
> > default setting use-fast-version). So, whatever the majority decides
> > is fine with me.
> 
> I'm voting for compile-time configuration then.

To be consistent with everything else, compile-time sounds like what we should do, its how just about every other part of Git is configured.

However Dmitry pointed out that he has cases where this faster function doesn't work correctly, and it was path specific. Some areas of the filesystem work, others don't, on the same system. A current example of a feature more like this is core.filemode.

A compile-time option makes the feature useful only to those users who don't ever have a repository which has a mount contained within the working directory. My understanding of Dmitry's explanation is he has such cases, which is why I was voting for a runtime configuration.

A compile-time option means that Git will work fine for years, until
you put a mount in a working directory and *wham* it suddenly stops
working like it should, because of that compile-time optimization
you made long ago and forgot about.
 
Show 6 quoted lines
> >> Besides it will remove your setup code, which looks bigger and provoked
> >> more discussion than the real subject itself.
> >
> > I believe Shawn wanted it to be configurable on per-repository basis.
> 
> which, I believe, is pointless.

See above. I suggested configurable per-repository because Dmitry seemed to be saying this feature only works in some of his repositories and not others. Controlling it by an environment variable isn't very easy to use as you move between repositories on the same system.

Maybe I should have leaned more towards compile-time earlier in the discussion, but Dmitry lead off the patch though with a remark about users just running the Cygwin package, without building their own Git. We can't expect the Cygwin maintainers to enable a feature in a software package that makes it work on 90% of the Cygwin installs out there; that's just asking for trouble.

But we can compile in a user-configurable switch, where the user can shoot their own foot off in the name of speed, especially if they can easily disable it on the oddball repositories where it fails.

Of course it might be even better if the code could auto-sense when its busted and just switch itself off. E.g. if four or more consecutive "fast" stat calls fail but the original Cygwin call succeeds then just always use Cygwin calls for the rest of the process.

-- 
Shawn.
Previous: Alex RiesenNext: Alex Riesen
Message 8 of 25 in “add GIT_FAST_STAT mode for Cygwin”
  1. add GIT_FAST_STAT mode for CygwinDmitry Potapov, Sep 23, 2008
  2. Alex RiesenSep 23, 2008
  3. Dmitry PotapovSep 23, 2008
  4. Jakub NarebskiSep 23, 2008
  5. Alex RiesenSep 24, 2008
  6. Dmitry PotapovSep 24, 2008
  7. Alex RiesenSep 24, 2008
  8. Shawn O. PearceSep 24, 2008
  9. Alex RiesenSep 24, 2008
  10. Shawn O. PearceSep 24, 2008
  11. Alex RiesenSep 24, 2008
  12. Shawn O. PearceSep 23, 2008
  13. Dmitry PotapovSep 23, 2008
  14. Shawn O. PearceSep 23, 2008
  15. Dmitry PotapovSep 23, 2008
  16. Shawn O. PearceSep 23, 2008
  17. Dmitry PotapovSep 23, 2008
  18. Shawn O. PearceSep 23, 2008
  19. Johannes SixtSep 23, 2008
  20. Dmitry PotapovSep 23, 2008
  21. Johannes SixtSep 23, 2008
  22. Dmitry PotapovSep 23, 2008
  23. Add a "fast stat" mode for CygwinMarcus Griep, Sep 27, 2008
  24. Alex RiesenSep 27, 2008
  25. Dmitry PotapovSep 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.