shithub: hugo

Download patch

ref: 5800a20a258378440e203a6c4a4343f5077755df
parent: e2e8bcbec34702a27047b91b6b007a15f1fc0797
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Wed Oct 4 18:12:51 EDT 2017

metrics: Detect partialCached candidates

This commit adds a "cache potential" column when running `hugo --templateMetrics --templateMetricsHints`.

This is only calculated when `--templateMetricsHints` is set, as these calculations has an negative effect on the other timings.

This gives a value for partials only, and is a number between 0-100 that indicates if `partial` can be replaced with `partialCached`.

100 means that all execution of the same partial resulted in the same output.

You should do  some manual research before going "all cache".