Maomi requires a lot of compile-time optimizations, so the compilation time might be really long in old machines.
To improve the compilation speed, the best way is to split components into several small crates, since rust compilation is crate-by-crate. If a crate code is not changed, it will not be re-compiled.
Another important tip is to avoid server side rendering compilation while debugging component logic. Since when server side rendering requires native binary for each components, this doubles the compilation time.
In general, smaller components bring more code re-using and compile faster. In maomi, components are near zero-cost abstractions which has very low runtime overhead.
When editing code in IDE with rust-analyzer, large code may slow down rust-analyzer, bringing bad coding experience.
It is able to tell maomi to optimize for rust-analyzer. When working with rust-analyzer, maomi can try to generate faster results. The results is not runnable but fast in cargo check.
To enable this experimental feature, set environment variable MAOMI_RUST_ANALYZER=on to rust-analyzer. Use Visual Studio Code as the example, this environment variable can be set in "rust-analyzer.cargo.extraEnv" and "rust-analyzer.check.extraEnv" settings.