Giter Site home page Giter Site logo

Comments (5)

tomvandig avatar tomvandig commented on August 17, 2024 1

Would vote against this, the WASM file as a standalone web resource enables browsers to cache the compiled code, reducing subsequent startup times by skipping compilation. More info here: https://v8.dev/blog/wasm-code-caching

I am by no means a chrome expert, but I expect this caching to break if we somehow bundle the wasm inside the js resource, they specifically mention:

Cached compiled code is associated with the URL of the .wasm resource, which makes it easy to look up without having to scan the actual resource. This means that changing the URL of a resource (including any query parameters!) creates a new entry in our resource cache, which also requires a complete recompile and creates a new code cache entry.

Could be this info is out of date though, no idea.

from web-ifc.

xeolabs avatar xeolabs commented on August 17, 2024

I wonder if there is a way to actually bundle/encapsulate web-ifc.wasm inside web-ifc-api.js and web-ifc-api-node.js?

from web-ifc.

agviegas avatar agviegas commented on August 17, 2024

I wish there was a way, it would be definitely cleaner 🤔 But as far as I know, the WASM file is not interpreted the same way as JS (they are precompiled), so I suspect that for that we need to do a couple of reverse-engineering hacks (e. g. generate the WASM file in runtime). Would this runtime-generation be worth for eliminating the wasm file? Honestly, I have no idea.

from web-ifc.

vegarringdal avatar vegarringdal commented on August 17, 2024

have a look at this:

https://github.com/mrdoob/three.js/blob/dev/examples/jsm/libs/meshopt_decoder.module.js#L8-L15

isnt the wasm code here ?

from web-ifc.

agviegas avatar agviegas commented on August 17, 2024

Hum, might be. Feel free to dig into this, could be nice if it removes the WASM file handling!

from web-ifc.

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.