mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 05:21:14 +00:00

This PR changes the filter `|tojson` so that it does not collect the serialized data into a string, but writes the data into the target writer directly. This makes the benchmark run 81% (only serializing) or 39% (serializing and escaping for HTML) faster. The benchmarked data is not a fair representation for the data you would most likely serialize, though.