Git Product home page Git Product logo

Comments (6)

tlively avatar tlively commented on July 17, 2024 4

Perhaps https://github.com/GoogleChromeLabs/asyncify could be useful for this!

from wasmer-js.

tlively avatar tlively commented on July 17, 2024 4

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.

torch2424 avatar torch2424 commented on July 17, 2024

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.

kripken avatar kripken commented on July 17, 2024

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.

torch2424 avatar torch2424 commented on July 17, 2024

@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.

Michael-F-Bryan avatar Michael-F-Bryan commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.