Thread (6 messages) flat view 6 messages, 4 authors, 2016-06-15

Re: inotify to minimize stat() calls

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:56:20

Possibly related (same subject, not in this thread)

Duy Nguyen wrote:
On Fri, Mar 8, 2013 at 3:15 PM, Junio C Hamano [off-list ref] wrote:
quoted
quoted
 The possible options are:
 +
-       - 'no'     - Show no untracked files
+       - 'no'     - Show no untracked files (this is fastest)
There is a trade-off around the use of -uno between safety and
performance.  The default is not to use -uno so that you will not
forget to add a file you newly created (i.e safety).  You would pay
for the safety with the cost to find such untracked files (i.e.
performance).

I suspect that the documentation was written with the assumption
that at least for the people who are reading this part of the
documentation, the trade-off is obvious.  In order to find more
information, you naturally need to spend more cycles.

If the trade-off is not so obvious, however, I do not object at all
to describing it. But if we are to do so, I do object to mentioning
only one side of the trade-off.  People who choose "fastest" needs
to be made very aware that they are disabling "safety".
On the topic of trading off, I was thinking about new -uauto as
default that is like -uall if it takes less than a certan amount of
time (e.g. 0.5 seconds), if it exceeds that limit, the operation is
aborted (i.e. it turns to -uno). The safety net is still there, "git
status" advices to use -u to show full information.
Ugh, this is too opaque; the user has no idea whether untracked files
are being counted or not.
Or a less intrusive approach: measure the time and advice the user to
(read doc and) use -uno.
I just learnt about -uno myself, from this thread.  At best, it's a
stopgap until we get inotify support.
But it's probably worth waiting for the first cut of inotify support
from Ram. It's better with inotify anyway.
This is quite urgent in my opinion.  One of git's primary tasks is to
quickly tell me what changed in the repository, and inotify is the
perfect way to do this.
I'll try to get the first cut out quickly, so we can immediately
correct any fundamental design flaws.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help