ChoicescriptIDE / main

32 stars 6 forks source link

Spelling CodeAction triggering is far too aggressive #109

Open CareyJWilliams opened 3 years ago

CareyJWilliams commented 3 years ago

Whenever there is a selection change, any (and all!) spelling mistakes in the selection will have their 'quickfix' code actions calculated. This can tank application performance with nothing more than a simple 'CTRL+A', as demonstrated in the gif below:

spellperf

We need to come up with a way to limit this, for e.g. only provide suggestions when the context is the size of the word (or smaller).

CareyJWilliams commented 3 years ago

Of course it does make sense that the lightbulb (at least) can cover all corrective actions for the current context (selection):

image

But it's just not feasible performance wise (unless we can cache results?).

CareyJWilliams commented 2 years ago

This might have improved with the move to the NSPELL library (https://github.com/ChoicescriptIDE/main/commit/825ce6c54c47039209fbcc8bd391acf061d21197). We're at least no longer spinning up a bunch of workers all the time.