5 ms·
I have a healthy suspicion of the performance of file-watchers. I hope this feature doesn’t make Git faster at the expense of “all filesystem operations crawl”.
by saagarjha 4y ago
I have a healthy suspicion of the performance of file-watchers. I hope this feature doesn’t make Git faster at the expense of “all filesystem operations crawl”.
- kevingadd 4y agoOn the bright side, filesystem operations on Windows are already slow so you don't need to worry about turning on a file-watcher there.
- sulam 4y agoThis has been the way to get performance on a large Git repo for over a decade now, just not built into Git. It provides very good improvements even in environments that aren't the fastest, like laptops.
- saagarjha 4y agoSee my point isn't whether this makes Git faster (it probably does) but it may have a performance impact on the rest of the system.
- sulam 4y agoWe deployed a system like this across hundreds of engineers in a reasonably sized monorepo and had zero complaints about system performance. While I don’t know the underlying architecture of inotify/etc, it seems to be very efficiently implemented.
- rkangel 4y agoIt is of course not turned on by default. I don't know how bad the performance hit is, but it's an option so you get to choose the tradeoff. Either your git operations are slow or you take the small hit on all operations. If you spend all of your time working in a big repo it's probably going to be worth it.
- hsbauauvhabzb 4y agoHooking writes at a kernel level shouldn’t have much impact, provided it’s actually hooking there
- saagarjha 4y agoI assume it is using one of the native platform APIs to detect file changes, which generally have some sort of overhead associated with them and then may or may not block on userspace code that can be badly behaved.