akinsho / akinsho/git-conflict.nvim

Signifcant performance overhead on watching .git folder

Offen
#129 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Lua
Sterne
1.4k
Forks
70
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I have been debugging why in some of the folders my plugin [fff](github.com/dmtrKovalenko/fff) scan is very contended and sometimes very slow on a large git repo and as appeared the reason is this function

https://github.com/akinsho/git-conflict.nvim/blob/a1badcd070d176172940eb55d9d59029dad1c5a6/lua/git-conflict.lua#L458-L470

you are setting recursive watcher on the `.git` folder unconditionally in case of chromium monorepo the `.git` folder is **64GB and 700k+ object files inside** - this exhauses the file system watcher, adds a lot of VFS load and simply unnecessary

Instead you can watch specifically one file `.git/index` - you can watch exatly one path and keep the exact functionality untouched

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.