Re: inotify to minimize stat() calls
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:06
Duy Nguyen [off-list ref] writes:
Can we replace "open a socket to our daemon" with "open a special file in .git to get stat data written by our daemon"? TCP/IP socket means system-wide daemon, not attractive. UNIX socket is not available on Windows (although there may be named pipe, I don't know).
I do not think TCP/IP socket is too bad (you have to be able to read the index file to be able to ask questions to the daemon to begin with, so you must have list of paths already; the answer from the daemon would not leak anything more sensitive than you can already know), and UNIX domain socket is not too bad either. Just like the implementation detail of the daemon itself may differ on platforms (does Windows have the identical inotify interface? I doubt it), I expect the RPC mechanism between the daemon and the client would be platform dependent. So take that "open a socket" as a generic way to say "have these two communicate with some magic", nothing more.