tach icon indicating copy to clipboard operation
tach copied to clipboard

`tach server` runs `check` too often

Open emdoyle opened this issue 1 year ago β€’ 0 comments

Right now, the LSP server built into Tach is very naive. When a Python document is opened or saved, it will run a full tach check and then filter the errors to the ones relevant to the file.

A relatively simple improvement would be to create an API for checking a single file at a time, since this should be fast enough (even for large files) to keep the current eager behavior.

Another avenue would be to make the server only re-check the project when Python files or the tach.toml are saved. When a file is opened, it could read the check results from a cached copy in memory, and on change it could either do nothing, or publish empty diagnostics. This seems more complex though, and probably doesn't perform noticeably better in most cases.

emdoyle avatar Dec 19 '24 22:12 emdoyle