4 ms·
I am confused about the multi-threading support in chrome. The article links to https://medium.com/google-earth/performance-of-web-assembly-a-thread-on-threadin
by aloer 7y ago
I am confused about the multi-threading support in chrome. The article links to https://medium.com/google-earth/performance-of-web-assembly-a-thread-on-threading-54f62fd50cf7 https://medium.com/google-earth/performance-of-web-assembly-... where they mention that chrome 74 added support for threading. Reading the 74 release notes I can't find anything
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... says that SharedArrayBuffer was readded in chrome (behind a flag?) in v67, not 74. Is that the same? Is SharedArrayBuffer equivalent to the support for multi-threading or were other parts disabled due to spectre – or not yet implemented in 2018?
This whole wasm/threading/spectre mitigation situation is difficult to follow
What is the state of this in July 2019. Do you know about a benchmark/good example project that gives a good overview of what's currently possible?
context: I want to build a tile based view (tiles in x/y dimensions + zoom levels). The content of the tiles is loaded from server (shapes mostly) and rendered into tile images client side. I also want the same tiles prerendered as identical images on the server.
For this I have a feeling that something like skia is the way to go. Skia can be used via wasm bindings. How I would fetch the shapes and render the tiles (or fetch the prerendered ones) transparently and then where to render the tiles into, that is what I am trying to figure out. It feels like multithreading could be very useful here. Right now only chrome appears to support OffscreenCanvas (which can be accessed from webworkers), hence the idea of using skia directly and possibly going a level higher to write whatever kind of multithreaded render logic in rust and run it with wasm and a single "canvas output". Whether skia is the right choice here or not is also something I have yet to figure out
The ultimate goal is quick startup (prerendered tiles) while simultaneously high performance when updating the entire view (=multiple tiles in parallel). This is mostly a learning project for me
- ehsankia 7y agoAccording to their docs [0], it was added in Chrome 70 behind a flag/origin trial. I'm guessing that 74 is when the flag got turned to ON by default? Here's the change which was back in February [1], so I think that's correct. [0] https://developers.google.com/web/updates/2018/10/wasm-threads https://developers.google.com/web/updates/2018/10/wasm-threa... [1] https://chromium-review.googlesource.com/c/chromium/src/+/1487808 https://chromium-review.googlesource.com/c/chromium/src/+/14...