Open clarfonthey opened 3 years ago
The only way a Server-Timing header can give the correct value is if the all of the content is pre-rendered before writing to the response. I don't think that's guaranteed.
True, then I guess that template rendering time should be a separate option. But we can still separate DB latency, etc. in the header.
Actually, this is possible with HTTP trailers. So, technically they wouldn't be headers, but you could still include the "headers" after the response has been rendered. This would strictly require HTTP/2 for this feature, but I think that's reasonable for a feature that will likely only be enabled when debugging. Plus, you could just choose to not emit the trailer if HTTP/2 isn't used anyway.
It would be nice if we could enable the option for gitea to serve
Server-Timing
headers with responses, as it would be very helpful with debugging.The option
SHOW_FOOTER_TEMPLATE_LOAD_TIME
should be incorporated into this instead, as more data can be included with the timing and it doesn't add information in user-visible areas.