aboutsummaryrefslogtreecommitdiffstats
path: root/book/src/performance.md
blob: 499eeb9d2696982a775a3f00f5c0bbfdd4bddc59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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.