Hello,
This proposal is like a “lessons learned” off-shoot from this earlier infloop debug I went through today.
Show templateMetrics
till the point when user hits Ctrl + C
If hugo is run with --templateMetrics
, would it be possible to catch the Ctrl + C
from the terminal and auto-display templateMetrics collected till the time Ctrl + C
was hit?
The resultant report can then hint the user where in the templates things got stuck.
Finer Breakdown of “culprits” in the templateMetrics report
Also, further on templateMetrics, can that feature record the callers of partials, templates, etc. too? In my instance, I have that debugprint,html
partial that’s used in all template files… so knowing that it’s called the highest number of times is not very useful.
But a finer characterization would be more helpful… like layouts/_default/terms.html
-> partial debugprint.html
, themes/FOO/layouts/index.html
-> partial debugprint.html
, and so on…
In that infloop issue, I was lucky to catch that issue… *shower debug*… something didn’t feel right about tagging a page that lists tags.
But having Ctrl+C based templateMetrics + a finer breakdown would easily catch such infloops.
\cc @moorereason @bep