bevy_egui was causing compilation of our large projects to delay until bevy, and more critically, bevy_pbr were done compiling. bevy_pbr is extremely slow, and depends on bevy_render, which is also slow to compile. The result is compilation cannot parallelize well.
This change should be entirely idempotent for users, it simply switches dependencies to the bevy subcrates. The effect of this is that bevy_egui, and anything that depend on it, can now start compiling at the same time as bevy_pbr, this had a huge positive effect on compile times in our larger project, because many things depend on bevy_egui.
The only "gotcha" here is that I had to depend on encase manually, otherwise you end up needing to go through bevy's ShaderType derive, which falls over when bevy is not in scope.
Using --timings on the simple example, on an M3 Max:
Before
After
As expected, this has no impact on the compile time of examples, because bevy_pbr still dominates, but in real applications, you will usually have a bunch of crates depending on bevy_egui, which can now start compiling a whole 4 seconds earlier (and even more on slower machines).
bevy_egui
was causing compilation of our large projects to delay untilbevy
, and more critically,bevy_pbr
were done compiling.bevy_pbr
is extremely slow, and depends onbevy_render
, which is also slow to compile. The result is compilation cannot parallelize well.This change should be entirely idempotent for users, it simply switches dependencies to the bevy subcrates. The effect of this is that bevy_egui, and anything that depend on it, can now start compiling at the same time as
bevy_pbr
, this had a huge positive effect on compile times in our larger project, because many things depend onbevy_egui
.The only "gotcha" here is that I had to depend on
encase
manually, otherwise you end up needing to go through bevy'sShaderType
derive, which falls over whenbevy
is not in scope.Using
--timings
on thesimple
example, on an M3 Max:Before
After
As expected, this has no impact on the compile time of examples, because
bevy_pbr
still dominates, but in real applications, you will usually have a bunch of crates depending onbevy_egui
, which can now start compiling a whole 4 seconds earlier (and even more on slower machines).