Re: [PATCH] fsmonitor: long status advice adapted to the fsmonitor use case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> We should be careful here, FSMonitor only helps with untracked
files if the untracked cache (UC) is also turned on.  They do work
well together and they greatly speed up things, but if either is
turned off, `git status` will still need to scan.

Oh, thanks, I didn't realize! With that, I agree that the messaging I'm
proposing is not technically correct, and needs to be fixed.

I agree with your advice about the message when FSMonitor and
untracked cache are both turned off. I'm also trying to think about
what advice to give when they are turned on, and git status was
slow because the update-index was building the cache on that call.

Importantly, I'm trying to think of ways to keep the messaging
accessible even when the user is not familiar with those concepts.
I'm thinking a user may not even know what is currently enabled or
not in their environment, so there's probably value in detecting their
situation, and best adapting the messaging to it.

For context, in our case, we set core.fsmonitor and core.untrackedCache
as part of our dev environment setup script, because we don't expect
our least advanced developers to ramp up on what they are. And yet,
it is useful to all of them to have them enabled, our git status is about
30 seconds long without FSMonitor and UC.

As a result, we have been receiving negative feedback that git status is
slow, but when we inform the user that it is cached, they run it again and
confirm that it is fine like this. The problem being about educating
users and not a technical issue, of course we're adding the info to our
setup doc, but I figured other large repos may hit this usability issue, so
here I am.

What do you think of those phrasings?

- If neither FSMonitor nor the untracked cache are turned on, changing
the current advice to: "It took %.2f seconds to enumerate untracked files.
You may want to skip that part with 'status -uno' but you have to be
careful not to forget to add new files yourself (see 'git help status').
Otherwise, you can enable the core.untrackedCache config to have
it be cached, and potentially the core.fsmonitor config to further improve
the cache's performance."

- If only the untracked cache is turned on, since you said it could already
improve some: "It took %.2f seconds to enumerate untracked files.
Your untracked cache is enabled, but you may want to enable the
core.fsmonitor config to further improve the cache's performance.
Otherwise, you may want to skip that part with 'status -uno' but you have
to be careful not to forget to add new files yourself (see 'git help status')."

- If they're both turned on: "It took %.2f seconds to enumerate untracked
files. Your untracked cache is enabled and fsmonitor is on,
so your next calls may be faster. Otherwise, you may want to skip that part
with 'status -uno' but you have to be careful not to forget to add new
files yourself (see 'git help status')."

I intentionally phrased it all in a way that manages expectations, "may be
faster", since you said the state of the FSM token could be impacted by a
variety of things, so we can't exactly commit to anything for sure about the
next call.

Let me know what you think, I definitely want to do this right.


> WRT testing

Oh, I didn't realize I could do this! Alright, I need time to look into it.
With that, it means I can test the existing advice message use case,
which I don't believe is currently tested, so I'm double-glad!


Thanks a lot for all the insight.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux