Open jrieken opened 2 years ago
(OP of the problem in the linked issue) It appears also that this linting occurs while typing in files that don't apply for any BEM help (particularly typescript files). Maybe it's possible to lint only in applicable file types (css, scss, etc)?
Hi both, thanks for raising this and giving so much detail :) I'll work on getting this fixed very soon
👋 Hey. VS Code Team here.
This extension appeared as causing slow-downs of the extension host and thereby also other extensions. See https://github.com/microsoft/vscode/issues/155520#issuecomment-1268476595 for the related discussion on our end.
I took a quick glance and I believe this is due to "responsiveLinting" - it is too eager as it validates documents as you type without any kind of debouncing. See https://github.dev/Box-Of-Hats/Bem-VSCode-Extension/blob/4918250dbfc60a37e33ddb6f3f0bfd047bad737f/src/extension.ts#L72. Doing an expensive operation on such a high frequency event is discouraged and validation should be debounced/delayed by something like 500ms