msgpack-javascript icon indicating copy to clipboard operation
msgpack-javascript copied to clipboard

Works as replacement of serialize-javascript

Open gfx opened this issue 6 years ago • 6 comments
trafficstars

https://github.com/yahoo/serialize-javascript is used to exchange structured data within workers and processes, which can serialize RegExp, undefined, Map, Set, and so on.

I believe replacement from serialize-javascript to msgpack could boost the performance in parallel tasks.

gfx avatar Jun 04 '19 07:06 gfx

Lol, yes, I am experimenting with it right now. We are processing tons of data inside webworker and I am testing how msgpack + arraybuffer transfer will work.

sergeyzenchenko avatar Jun 04 '19 08:06 sergeyzenchenko

But my concert is that we'll produce additional work for GC during msgpack parsing because native object transfer probably allocating objects in way that can be better handled by GC during transfer phase.

sergeyzenchenko avatar Jun 04 '19 08:06 sergeyzenchenko

lol. 🆒

gfx avatar Jun 04 '19 12:06 gfx

Have you tested how it works comparing to structured cloning in WebWorkers? @gfx

sergeyzenchenko avatar Aug 07 '19 14:08 sergeyzenchenko

Not tested yet, because I have no project with web workers.

gfx avatar Aug 08 '19 03:08 gfx

ok, I am going to test in next week

sergeyzenchenko avatar Aug 08 '19 07:08 sergeyzenchenko