How to use Dexie.js inside of dedicated worker?

Viewed 978

I have a function that fetch a JSON data via window.fetch and put it inside IndexedDB table via db.table.bulkPut(array_of_data). It takes more than 10 seconds to do that because of large amount of data and it blocks UI and makes UX bad. I have decided to run this task in a Worker, but I have not found any examples how can I make that with Dexie.js or directly with IndexedDB

Thank you for any advice :)

1 Answers
Related