Builtin webworker support and debounce support
See original GitHub issueDescription
When many extensions is mounted on the Editor
instance, for example, like some extension that includes some complex work, such as computing tasks like regular matching even I/O tasks like HTTP Request, in my case, extensions with 10+ regular matching tasks, could cost 62ms
to run on relatively largely documents(eg. 2000+ words) after every input
event.
Possible solutions
For now, I want to debounce the builtin transaction( or document update)
event that creates a new state on old state, which means the transaction could be dispatched after users stop typing. Or another solution is to run the complex and time-consuming work in webworker or background so that it would not block the main UI thread, yes, like vscode
does, which enables linter
, formater
, hignlighting
run in background.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6 (4 by maintainers)
I will work on it with a practical benchmark later…
I was using debounce from lodash, which was not async supported so it was not working before.
Now i switch to debounce from awesome-debounce-promise , which support async and now it is working.