I am building a web application with large amounts of json data.
The data will be filtered and shown in a table and ideally I would like the filtering to be done by a web worker.
However, from what I've read transferring json data between the parent and the worked also causes overhead so I am wondering:
Is it possible for a worker to load the json data once, cache it and then make the data persistent between calls?
Is this possible, and does it make sense?
/Patrik
Workers can use IndexedDB for persistent storage.
Workers can’t use Web Storage (localStorage) but there are good small IndexedDB libs, like Dexie—which can be used in workers & which makes using IndexedDB nearly as easy as localStorage.