Seamlessly use Web Workers to offload work that could block user interaction and page rendering.
With fibrelite you can turn any async function into a Web Worker. Fibrelite has three core approaches to handling work:
- Execute: Execute an async function as a Web Worker
- Debounce: Only run the an async function on last value in a batch of incoming operations
- Prioritise: Run all incoming operations but kill off workers as new operations come in
Check out fibrelite in action here.
npm install fibrelite
Or for yarn:
yarn add fibrelite
- More use cases / examples
- Performance review
A massive thanks to Jason Miller for the Greenlet library on which this is heavily based and inspired.