rescript-lang / rescript-vscode

Official VSCode plugin for ReScript
MIT License
329 stars 56 forks source link

Cache project config on demand #1000

Closed zth closed 4 months ago

zth commented 4 months ago

Experimental support for caching the project config to speed up analysis.

It should be good enough to merge and get started testing, and we can then polish before making it the default.

You enable it via the rescript.settings.cache.projectConfig.enabled extension config option. It'll then watch build.ninja and build a cache of (some of) the project config, that the analysis can then read as needed and avoid doing a bunch of work.

In larger repos this has shown latency improvements of +8-9x. So a massive improvement.

Running it as experimental for a while to get some feedback, and then hopefully something that'll be easy and risk free to enable for everyone.