diff options
Diffstat (limited to 'book/src/performance.md')
-rw-r--r-- | book/src/performance.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/book/src/performance.md b/book/src/performance.md new file mode 100644 index 0000000..499eeb9 --- /dev/null +++ b/book/src/performance.md @@ -0,0 +1,16 @@ +# Performance + +## Slow Debug Recompilations + +If you experience slow compile times when iterating with lots of templates, +you can compile Askama's derive macros with a higher optimization level. +This can speed up recompilation times dramatically. + +Add the following to `Cargo.toml` or `.cargo/config.toml`: +```rust +[profile.dev.package.askama_derive] +opt-level = 3 +``` + +This may affect clean compile times in debug mode, but incremental compiles +will be faster. |