Skip to content

Decouple from yoga-layout-prebuilt #30

@giulioz

Description

@giulioz
Member

We should build our version of yoga to reduce bundle size

Activity

drcmda

drcmda commented on Sep 7, 2020

@drcmda
Member

does yoga have stuff that we dont need?

giulioz

giulioz commented on Sep 7, 2020

@giulioz
MemberAuthor

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

drcmda commented on Sep 7, 2020

@drcmda
Member

that sounds amazing!

talentlessguy

talentlessguy commented on Sep 7, 2020

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

drcmda commented on Sep 7, 2020

@drcmda
Member

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

linked a pull request that will close this issue on Sep 12, 2020
linked a pull request that will close this issue on Sep 18, 2021
gut4

gut4 commented on Dec 5, 2021

@gut4

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

saitonakamura commented on Dec 5, 2021

@saitonakamura
SponsorCollaborator

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

saitonakamura

saitonakamura commented on Dec 8, 2021

@saitonakamura
SponsorCollaborator

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @gut4@giulioz@saitonakamura@drcmda@talentlessguy

      Issue actions

        Decouple from yoga-layout-prebuilt · Issue #30 · pmndrs/react-three-flex