Skip to content

Bevy cold compilation times regressed 25% since 0.7 #5528

@nicopap

Description

@nicopap

Compilation times on a cold build between 0.7 and 0.8 regressed, see discord discussion

What solution would you like?

@inodentry :

  • serde, roughly dividing the whole dependency tree into 2 halves: "things that can be compiled before serde" and "things that need serde"; but this is out of scope for us, can't really do anything about it
  • wgpu: most of the bevy crates are done, while wgpu is still compiling
  • bevy_render, needs wgpu, and all the other big stuff like bevy_sprite and bevy_pbr needs it

Options are:

  • Splitting bevy_render so that compilation can be more parallel
  • Improving both bevy_pbr and bevy_sprite compile times
  • Magic away serde
  • Adding a few more cargo feature gates on some dependencies, notably naga

What alternative(s) have you considered?

Get a drink and chill out while my game compiles.

Context

Note that this only affects cold builds (usually builds for release game artifacts), not iterative builds, which is what happens in the edit/save/look at result dev loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Build-SystemRelated to build systems or continuous integrationC-PerformanceA change motivated by improving speed, memory usage or compile timesC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions