Repository navigation
-
The 2-second status poll is much cheaper, for Windows in particular, where each Git process costs tens of milliseconds (#50). A steady poll now starts one Git process instead of about twenty:
- the page asks for
api/v1/status?include=changes, which builds the status and the changed-file list from a singlegit status(api/v1/changesstill works on its own), and fetches identity only until it has filled the form; - Git's availability, the folder check, identity and other settings, the hooks folder and line counts of files that haven't changed again are remembered for the session. They are read again when the files behind them change, after a minute at most, or after any action gitneighbr takes;
- a merge, rebase, cherry-pick or revert in progress is found from Git's marker files, without starting Git;
- untracked files are read again only when they change, and a launcher policy's globs are converted to regular expressions once.
Payloads are unchanged. On a Windows test machine, through a launcher with a policy:
api/v1/status894 ms → 90 ms; the page's whole poll about 2.2 s → 196 ms. - the page asks for