Speed up partial theme checks & add "themeCheck.onlySingleFileChecks"
The difference here is that instead of rerunning all the whole theme checks on change, as we previously did, we only do that on save and open when "themeCheck.onlySingleFileChecks" is false. What this means is that whenever you are typing, only the single file checks will run.
This takes ~10ms on my M1 MBP. Not the best machine to do benchmarks on but it's 125x faster than what we had before. So I'm assuming that this 100x+ improvement will transfer to slower machines as well :D
When "themeCheck.onlySingleFileChecks" is true, then we disable all whole theme checks entirely and only report failures for the open files. This means that it will always be fast, but it comes at the cost of not having MissingTranslations, UnusedSnippet, and other checks that span multiple files.
Fixes #542
Fixes #507
Improve performance of from_row_column_to_index
Make it do twice as many iterations per second (according to benchmark/ips) than the previous implementation.
Save hundreds of thousands of calls by caching some methods
Speed up partial theme checks & add
"themeCheck.onlySingleFileChecks"
The difference here is that instead of rerunning all the whole theme checks on change, as we previously did, we only do that on save and open when
"themeCheck.onlySingleFileChecks"
is false. What this means is that whenever you are typing, only the single file checks will run.This takes ~10ms on my M1 MBP. Not the best machine to do benchmarks on but it's 125x faster than what we had before. So I'm assuming that this 100x+ improvement will transfer to slower machines as well :D
When
"themeCheck.onlySingleFileChecks"
is true, then we disable all whole theme checks entirely and only report failures for the open files. This means that it will always be fast, but it comes at the cost of not having MissingTranslations, UnusedSnippet, and other checks that span multiple files.Fixes #542 Fixes #507
Improve performance of from_row_column_to_index
Make it do twice as many iterations per second (according to benchmark/ips) than the previous implementation.
Save hundreds of thousands of calls by caching some methods
Before
https://user-images.githubusercontent.com/4990691/155556285-a0490562-d59e-48f8-ad7f-fe7cf2ac759c.mp4
After
`"themeCheck.onlySingleFileChecks": false
https://user-images.githubusercontent.com/4990691/155549947-3274d4b0-ee8a-4fc5-a76c-584a014055d3.mp4
`"themeCheck.onlySingleFileChecks": true
https://user-images.githubusercontent.com/4990691/155550962-a1b0dd41-de3e-4912-b836-b0c7d35655d5.mp4