You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you don't want to run CPU-intensive SQL queries in your main application thread, you can use the more limited WebWorker API.
It gives a couple examples and caveats, but I need a lot more information to use the feature. I need a list of messages I can pass, what the worker will pass back, and a description of what the limitations are. There's no page on the website or GitHub wiki about this.
Other issues:
The docs say to get the file from the releases page, but I'd rather get them from node_modules/sql.js/dist so they get version updates. But someone in this issue said that won't work. This is something that should be covered in a full explanation of how to use web workers.
@types/sql.js is missing types for the web worker API.
Because of these missing docs, for my app I'm going to write my own custom web worker using the normal SQL.js API.
I'll also highlight the proposal to remove the whole web worker API, which would be a way to avoid this whole issue (though you'd still want the docs to have some hints about how/why to write a custom web worker): #377