Coder Social home page Coder Social logo

Comments (4)

NickDriscoll avatar NickDriscoll commented on June 11, 2024

I had to learn that incremental compilation isn't enabled by default in release mode. Enabling it brought the build times back down to normal, but of course this is just masking the underlying problem.

from gltf.

aloucks avatar aloucks commented on June 11, 2024

The primary culprits are: serde + serde_derive + gltf-json

serde is known to be somewhat slow to compile. The derived serialization and deserialization code is monomorhpized, resulting in quite a lot of generated code. On the other hand, miniserde uses trait objects (dynamic dispatch), so much less code is generated (and will result in some performance loss). It may be worthwhile to explore miniserde, but it has a substantially reduced set of customizations.

from gltf.

Elabajaba avatar Elabajaba commented on June 11, 2024

gltf-json is the main slowdown from my testing. (with LLD on windows, 1.64 nightly)

Release build of the whole gltf repo (cargo +nightly build --release -Z unstable-options --timings=html)

gltf-json

Release build of bevy where gltf-json doesn't seem to block any crates from compiling, but still takes 40% of the overall time to compile.

bevy-timings

from gltf.

Elabajaba avatar Elabajaba commented on June 11, 2024

Checking this with cargo-llvm-lines, a release build of gltf-json expands to 577761 lines of llvm, with the vast majority of the time being spent in codegen.

edit: There's an open PR for serde_json that improves build times for me by over 50%.

from gltf.

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.