Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WebAssembly build of Yoga #150

Closed
alcuadrado opened this issue Mar 9, 2019 · 4 comments
Closed

Use WebAssembly build of Yoga #150

alcuadrado opened this issue Mar 9, 2019 · 4 comments

Comments

@alcuadrado
Copy link

Hi @vadimdemedes! Congrats on shipping v2, it's an amazing project! Thanks for creating it :)

One thing I noticed is that it's startup time takes quite a bit. It takes 150-190ms to run a require("ink") in my 2017 MBP.

Using time-require I found that 70% of that time is spent in node_modules/yoga-layout-prebuilt/yoga-layout/dist/entry-browser.js, your asm.js build of Yoga. I think this could be improved if Yoga is compiled into wasm.

There's no official way doing that in Yoga, but I found this build, which seems to load 2x faster than the asm.js version. It has no docs, and importing it is an async operation, so it may not be a good fit.

@vadimdemedes
Copy link
Owner

Thank you!

Nice suggestion, I'll see how it works and maybe will integrate it into https://github.com/vadimdemedes/yoga-layout-prebuilt, which Ink uses.

@vadimdemedes vadimdemedes changed the title Possible startup time optimization Use WebAssembly build of Yoga Mar 18, 2019
@apatrida
Copy link

Another WASM build of Yoga: https://github.com/rickbutton/yoga-wasm

@vadimdemedes
Copy link
Owner

Nice, I'll check it out.

@vadimdemedes
Copy link
Owner

Fixed via #550.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants