Documentation about how to run various performance benchmark for djangofmt versus similar tools:
djlint: Same scope asdjangofmt- fully featured template formatterdjhtml: Only an indenter, it will never add/remove newlinesdjade: Only format django template syntax - HTML is not formattedprettier: Does not support Django and only format HTML
Simply run this command, providing a directory containing django templates.
You can change the print width with the LINE_LENGTH env variable (default: 120)
just bench-py ~/templatesA setup step will discover every html files inside and then run the various tools on it.
Important
This will cause destructive operations, be sure to target a safe directory (tracked with git or temporary)
Built using vega playground.
Color palette:
- bars ->
#187f58 - labels (light mode) ->
#333333 - labels (dark mode) ->
#c9d1d9