Comments (6)
Perhaps https://github.com/GoogleChromeLabs/asyncify could be useful for this!
from wasmer-js.
Cc @kripken for the performance issues. Itβs unfortunate that Binaryen is too slow here because this is definitely the type of use case we want to support!
from wasmer-js.
Yo! What up Thomas? π
So at the last WasmSf, this is what I tried to ask about without announcing this haha! π
So we tried running Binaryen.js to run a bunch of passes for us, but since it builds an AST and then makes changes, and then get output from that AST, it was super slow for desktop devices, and even slower on mobile. Since we wanted to make sure this would be reasonably fast on many devices we decided to keep an eye on Asyncify for the future, and we discussed it may be a good idea for us to try and do this server side on WAPM and/or detect if a module is already asyncified π
So it's something we definitely need to do some more discussion about, but I very much appreciate you suggesting this! π π
from wasmer-js.
Oh, yeah, I was talking to @torch2424 about this earlier. Currently binaryen.js is not wasm (asm.js for maximum portability), and uses C++ exceptions. Once we have exceptions in wasm, we can make a wasm build, and that should be much faster.
Btw, one thing I didn't get - why is this done on the client?
from wasmer-js.
@tlively Yeah it is! But it's not the fault of binaryen at all, what we are trying to do is a little extreme haha! π
@kripken Yep! Looking forwawrd to it! π And the reason why we wanted to do it on the client, as we wanted anyone to use whatever module they wanted, not just modules from WAPM. So this is something we could enable for WAPM modules, but then users would have to host their own asyncify servers for their eventual end users, or pre-lower all of their modules before using them. Which I think is a little out of scope of what we wanted to achieve in our MVP. But we definitely want to be able to identify and supported asyncified modules in the future π
from wasmer-js.
This is no longer necessary because the new SDK executes blocking operations (like executing WebAssembly code) on a Web Worker in the background.
from wasmer-js.
Related Issues (20)
- [SDK-55] Create a React SDK HOT 1
- [SDK-61] Allow users to abort loading a package
- Add Next.js example HOT 3
- Add webpack example HOT 1
- Automatically deploy ffmpeg demo to edge HOT 1
- Wasmer-JS running on Node HOT 2
- Safari fetch HOT 1
- Unable to use the registry for the JS-SDK? HOT 4
- Clarification on persistent file system access in browsers HOT 3
- How do I cache the package from the registry? HOT 3
- Allow `Directory` to hook into the browser's FileSystem API HOT 1
- Spurious timeouts in CI HOT 1
- Is there a way to run Python in the browser with certain Python packages? HOT 1
- markdown-renderer is not doing anything; returning original string. HOT 2
- Wasmer fails to load in React application created with create-react-app HOT 3
- runWasix fails, "memory import has 1 pages which is smaller than the declared initial of 17" HOT 3
- Loopback Networking HOT 1
- Reusable WebBrowser Component HOT 1
- Allow for custom entry points
- Unable to find "registry name" in the registry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasmer-js.