mosaic
mosaic copied to clipboard
Use Shared Web Workers
At least in the demos in the docs, DuckDB is running as a dedicated Web Worker. We often have users opening several tabs that would want to share the same data. Is there any reason that wouldn't work, or are there configuration knobs to tweak for that?
I haven't played with shared worker yet but you could try instantiating a shared worker instead when intializing DuckDB wasm. Docs are at https://github.com/duckdb/duckdb-wasm/tree/main/packages/duckdb-wasm.
I opened an upstream discussion
- https://github.com/duckdb/duckdb-wasm/discussions/2063