worktank
main-thread-scheduling
worktank | main-thread-scheduling | |
---|---|---|
1 | 8 | |
34 | 1,113 | |
- | - | |
6.6 | 8.9 | |
29 days ago | 15 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
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.
worktank
-
Web Crypto API
Workers are awesome but you are right, working with them can be painful without the right tooling.
Personally I've written my own libraries for abstracting all this away and I've having a blast working with workers now, maybe check them out:
- WorkTank [1]: This abstracts away the difference between browser workers and Node worker threads, it makes it easy to make worker pools, and it can transfer simple functions to a worker at runtime too.
- WorkTank loader: This abstracts away loading asynchronous function from a worker basically, you just add ".worker" to your file name and that file and all its dependencies are transparently replaced moved to a worker, all the rest of the app (TS types for example) doesn't even notice anything happened, it just works.
You might want to check out the more popular "comlink" library too, although it didn't work for me for whatever reason and it doesn't support worker pools I believe.
[1]: https://github.com/fabiospampinato/worktank
[2]: https://github.com/fabiospampinato/worktank-loader
main-thread-scheduling
-
What is INP and why you should care
During my research for this post, I discovered main-thread-scheduling, a JavaScript task scheduler developed by Antonio Stoilkov that focuses on helping you improve perceived page performance, and therefore, your INP scores. It uses isInputPending() if available, but provides scheduling functionality for all browsers. Personally, I haven’t had a use case to test this just yet, but at first glance, it’s currently maintained and could be worth a try.
-
Main-Thread-Scheduling
It's done — https://github.com/astoilkov/main-thread-scheduling/commit/0.... Thanks.
A little thing but a great improvement. I'm now wondering why I did that.
-
Better npm search proposal
Exclude bots. Bots activity should be excluded, otherwise, the search will probably get a lot worse. Also, it opens an opportunity for easy manipulation. For example, a version bump by a bot shouldn't count at all. Similar to how GitHub's repo contributions page work.
-
I've made my app's search fast and open-sourced the solution
The library — https://github.com/astoilkov/main-thread-scheduling
- Main thread scheduling — faster apps using a simple API instead of Web Workers
-
Consistently responsive apps while staying on the main thread
For the past 11 months, I've been working on a very easy-to-use alternative to Web Workers. It's a way to schedule long-running, heavy tasks on the main thread. React has such implementation internally. Browsers are planning to add such functionality in the future.
What are some alternatives?
wasm-futures-executor - Executor for asynchronous task based on wasm web workers.
promise-workers
objectbuffer - JavaScript Object like api, backed by an arraybuffer
dayschedule-widget - Appointment scheduling widget to embed the booking calendar on your website for 1:1, round-robin and group bookings with Google meet, Zoom and MS Teams integrations
worktank-loader - WebPack plugin for WorkTank which enables you to execute whole files in a worker pool, transparently.
talk - Issues and discussions for the notes app, Nota.
rinzler - An autonomous parallel processing engine for the browser.
npm-search - 🗿 npm ↔️ Algolia replication tool :skier: :snail: :artificial_satellite:
wireworld-player - A multithreaded web app for loading and simulating instances of the Wireworld cellular automaton
Fuse - Lightweight fuzzy-search, in JavaScript
comlink - Comlink makes WebWorkers enjoyable.