greenlet
preact-worker-demo
greenlet | preact-worker-demo | |
---|---|---|
1 | 1 | |
4,650 | 225 | |
- | - | |
0.0 | 0.0 | |
about 3 years ago | 5 months ago | |
JavaScript | JavaScript | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
greenlet
-
Converting expensive synchronous functions to asynchronous
Greenlet (or a similar library) may help: It lets you invoke a function as if it were async, but it runs in a web worker.
preact-worker-demo
-
Preact Async Rendering
There are some documented solutions for this problem using web workers. Web workers run on secondary CPUs, so they are not blocking.
What are some alternatives?
parallel.js - Easy multi-core processing utilities for Node.
workerize-loader - ๐๏ธ Automatically move a module into a Web Worker (Webpack loader)
partytown - Relocate resource intensive third-party scripts off of the main thread and into a web worker. ๐
workly - A really simple way to move a function or class to a web worker. ๐๏ธโโ๏ธโ ๐
useWorker - โ๏ธ useWorker() - A React Hook for Blocking-Free Background Tasks
threads.js - ๐งต Make web workers & worker threads as simple as a function call.
react-native-threads - Create new JS processes for CPU intensive work
worker-plugin - ๐ฉโ๐ญ Adds native Web Worker bundling support to Webpack.
comlink - Comlink makes WebWorkers enjoyable.
Preact - โ๏ธ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.