DEV Community

Discussion on: Seamless web workers & worker threads - threads.js

Collapse
 
brieucp profile image
brieucp

Looks a lot like Comlink and workway which are much lighter... (arround 1kb each).

Collapse
 
erebos-manannan profile image
Erebos Manannán

I've never understood the JS community's obsession with smallest libraries. 1kB vs 10kB makes exactly no difference for download nowadays. Basic HTTPS handshake takes more time than downloading that amount of data.

Collapse
 
brieucp profile image
brieucp

Well, JS costs more than just the kb to download. And I disagree with your statement 10kb instead of 1kb, when you're on a low 3G or even on Edge, can make a huge difference !

Still, thread.js is interesting, being able to pass observable thru worker is great !

Collapse
 
andywer profile image
Andy Wermke

They play in the same ball park, but Comlink only works with web workers (no node.js support) and lacks a bunch of features, like out-of-the-box support for TypeScript workers without transpilation, support for observables and some more things.

Not sure about workway. It seems to support web workers and node worker threads, but won’t work easily with webpack and seems to lack the TypeScript features, for instance.

Collapse
 
bennycode profile image
Benny Code

Comlink now supports Node.js: github.com/GoogleChromeLabs/comlin...

P.S. I like you "ball park" expression. 😄