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

Decouple from yoga-layout-prebuilt #30

Open
giulioz opened this issue Sep 7, 2020 · 8 comments · May be fixed by #37 or #67
Open

Decouple from yoga-layout-prebuilt #30

giulioz opened this issue Sep 7, 2020 · 8 comments · May be fixed by #37 or #67
Labels
enhancement New feature or request

Comments

@giulioz
Copy link
Member

giulioz commented Sep 7, 2020

We should build our version of yoga to reduce bundle size

@giulioz giulioz added the enhancement New feature or request label Sep 7, 2020
@drcmda
Copy link
Member

drcmda commented Sep 7, 2020

does yoga have stuff that we dont need?

@giulioz
Copy link
Member Author

giulioz commented Sep 7, 2020

We have to investigate that, surely yes, also the current build includes a lot of useless C++ glue code that is really useless and it compiles to asm.js. Wasm binary would be way more efficient, even though it would need a binary to be served like draco.

@drcmda
Copy link
Member

drcmda commented Sep 7, 2020

that sounds amazing!

@talentlessguy
Copy link
Member

We have to investigate that, surely yes, also the current build includes a lot of useless C++ glue code that is really useless and it compiles to asm.js. Wasm binary would be way more efficient, even though it would need a binary to be served like draco.

WASM binary takes time to load tho

but I doubt that yoga binary will be big

so I think it's ok to ship as wasm

@drcmda
Copy link
Member

drcmda commented Sep 7, 2020

if it suspends it would be ok if it takes a little to load, similar to gltf assets, textures and so on.

@giulioz giulioz linked a pull request Sep 12, 2020 that will close this issue
@astahmer astahmer linked a pull request Sep 18, 2021 that will close this issue
@gut4
Copy link

gut4 commented Dec 5, 2021

Look at https://github.com/dead/typeflex
It's typescript port of Facebook's Yoga

It's only 23kb(gzip)
https://bundlephobia.com/package/typeflex@0.1.0

While yoga-layout-prebuilt 78kb(gzip)
https://bundlephobia.com/package/yoga-layout-prebuilt@1.10.0

@saitonakamura
Copy link
Collaborator

@gut4 as i understand it has the same api? Looking pretty good, did you have any experience using it?

@saitonakamura
Copy link
Collaborator

saitonakamura commented Dec 8, 2021

Ok, it's not the same api, but potentially it can be migrated to without too much hassle (methink). However, I'd be happy to see some benchmarks
I started the barebone here https://github.com/saitonakamura/yoga-js-benchmarks, but if some will point me to already calculated results, i'd be grateful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants