ocReaper / wp-server-timing

Add Server-Timing header information from within your WordPress sites.
MIT License
31 stars 7 forks source link

What is template processing? #26

Open Hasokeyk opened 11 months ago

Hasokeyk commented 11 months ago

What exactly is "template processing"? Which operations result in this time increasing?

Fidelity88 commented 9 months ago

I would also like to know this!

ocReaper commented 9 months ago

Thank you for the question @Hasokeyk @Fidelity88 ! Sorry for the long delay.. šŸ˜”

It's basically creating the rendered html. It can be deceiving because one might think it only contains html processing, but any plugin can contribute to this by hooking to wp_head, wp_footer, the_content or any other filter that modifies the output.

Strictly saying it's the time from rendering the doctype or <html> to the end of the footer or in other words the </html>.

Fidelity88 commented 9 months ago

@ocReaper would it be possible to further define this. As in, more details?

Right now, ā€œtemplate processingā€ takes the most time out of all server timing headers. Iā€™d love to see more headers to define the precise location on which plugin, theme or file adds unnecessary time to loading