aboutsummaryrefslogtreecommitdiffstats
path: root/book
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--book/src/SUMMARY.md1
-rw-r--r--book/src/performance.md16
2 files changed, 17 insertions, 0 deletions
diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md
index 6613796..486e510 100644
--- a/book/src/SUMMARY.md
+++ b/book/src/SUMMARY.md
@@ -8,3 +8,4 @@
- [Template syntax](./template_syntax.md)
- [Filters](./filters.md)
- [Integrations](./integrations.md)
+- [Performance](./performance.md)
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.