mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 15:25:19 +00:00
Add section for performance tips
This commit is contained in:
parent
cc7b9796d8
commit
f3d619bacf
@ -8,3 +8,4 @@
|
||||
- [Template syntax](./template_syntax.md)
|
||||
- [Filters](./filters.md)
|
||||
- [Integrations](./integrations.md)
|
||||
- [Performance](./performance.md)
|
||||
|
16
book/src/performance.md
Normal file
16
book/src/performance.md
Normal file
@ -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.
|
Loading…
x
Reference in New Issue
Block a user