Improve compile times of eframe
#4481
Labels
dependencies
Pull requests that update a dependency file
good first issue
Good for newcomers
help wanted
Extra attention is needed
eframe currently compiles in about 10s on my M3 MacBook Pro, as measured by
Getting rid of proc-macros
A lot of that time is waiting for
proc-macro
andsyn
so that we can start compilingbytemuck
,thiserror
, andforeign-types-macros
(used bycore-graphics
, which is used bywinit
).Getting rid of the proc-macros in
bytemuck
should be simple (replace by manual implementation of itsunsafe
traits forColor32
,Vertex
etc).Likewise, replacing
thiserror
should also be fairly trivial.I haven't looked into
foreign-types
, but even removing some proc-macro usage should allow some crates to start compiling earlier, hopefully reducing the total end-to-end compilation time.Other stuff
ahash
has abuild.rs
takes a full second to runicrate
takes 5-6 seconds of CPU timewgpu
Switching
glow
forwgpu
adds another 10s, i.e. doubling the compilation time.To investigate the compilation time of wgpu, run:
The text was updated successfully, but these errors were encountered: