Hi @ChromiumDev, previously code like `new ArrayBuffer(LARGE_NUMBER)` took several hundred milliseconds to execute. With todays Canary it doesn’t even take a single millisecond. How is that possible?
I think it will always be faster or the same speed without the workers now, for chromium. In Node.js, the allocator calls system calloc() directly so it depends on the system allocator, but I suspect that is also faster. If not, we should fix it there too, so it's fast by default
-
-
Thanks a lot. I guess I have to come up with a clever way to detect if the worker-workaround (TM) is needed or not. Hopefully without doing any browser sniffing. At least Safari (I have not tested Edge) has still problems with allocating large ArrayBuffers.
-
The idea is to free the garbage collection of the main thread from taking care of that ArrayBuffer and let the worker do it without causing jank on the main thread. I was never able to come up with a test which verifies that this is a good idea. I guess you know if it is or not.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.