Open horenso opened 8 months ago
Thank you for creating this issue!
The gain of compilation speed 8->5s is quite minimal and I also don't think there is much more potential (as afaik Diesel causes most of the compilation time).
Splitting up in 3 modules make sense, so that the module structure represents our architecture. But only if it does not involve too much time effort, as the gain is not huge.
Adding a newline to
main.rs
the backend and recompiling it takes ~8 seconds. This is a drag and there might be oportunities to improve this.We could split up the backend into seperate crates, in Rust a crate is one compilation unit. As an experiment, I seperated the model (database and dto) into its own layer on this branch and it improved it already to ~5 seconds, but it was done very quicky and I believe it could be done much better.
How would the backend be split up?
There are different ways to structure projects in Rust. I suggest:
The
backend
directory:What does this improve?
Disadvantages
It's not an urgent issue, but at some point when compile times increase we should spilt up the backend at some point.