wundergraph icon indicating copy to clipboard operation
wundergraph copied to clipboard

Compilation time is too slow (more than 40s)

Open Farkal opened this issue 5 years ago • 3 comments

Example -> https://github.com/Farkal/test-wundergraph

Farkal avatar Feb 03 '20 09:02 Farkal

Seems linked with rustc -> https://github.com/rust-lang/rust/issues/68796

Farkal avatar Feb 05 '20 08:02 Farkal

It seems like you could easily half the compilation time by not having a lib.rs and a main.rs in the same crate. I assume this setup results in rustc building the crate twice. Without that a cargo check is from me less then 10 seconds, a cargo build less then 20 seconds when having only a lib.rs. So the right strategy here seems to be having two crates, one for the wundergraph definition, and one for the final binary.

weiznich avatar Feb 07 '20 09:02 weiznich

Did you try with main in /bin ? (I did it and don't see any change but perhaps it work for you) It's still not easy to dev large app :/

Farkal avatar Feb 07 '20 10:02 Farkal