microsoft / microsoft/typespec
Improve language server file system cache
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
We use the file watching mechanism provided by LSP and cache to avoid repeated I/O. But it doesn't currently prevent us from hitting the disk to do realpath a lot or from stat'ing directories, etc. Profiling in #868 show that this is significant and can eat up > 90% of the time in a language server call on an up-to-date program.
That said this isn't high priority. While the amount of time spent in I/O is very significant relative to an up-to-date program (after https://github.com/microsoft/cadl/pull/868), it isn't likely to be noticeable. It is overall a small amount of time, it's just nearly all that we do when the program is up to date. It probably makes sense to wait for a case where this is perceptible before adding complexity to go after these final milliseconds. I suspect you will need a *lot* of files/libraries pulled in by your project before you can notice it.
Contributor guide
Assessment
This issue has not been assessed yet.