Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render time support? #35

Open
mperham opened this issue Feb 27, 2020 · 2 comments
Open

Render time support? #35

mperham opened this issue Feb 27, 2020 · 2 comments

Comments

@mperham
Copy link

mperham commented Feb 27, 2020

Has anyone added or know how to add rendering time output for templates? I have some slow pages and it would be a huge benefit to see something like:

<!-- foo.ego in 43.1234ms -->

in the page source. It would allow me to narrow down view performance issues to a specific template very quickly.

@benbjohnson
Copy link
Owner

@mperham Are you mainly wanting timings of nested templates? That could be an easy hook to add to the code generation.

Another option is you can use go tool pprof to see the aggregate render times for each template.

@mperham
Copy link
Author

mperham commented Feb 27, 2020

Yes. I guess having timings within a tightly nested loop or popular component wouldn't be useful but I don't have those issues. Even if I have to opt-in for timings, it's all good.

I just spent several hours trying to use pprof on macOS to figure out the slow rendering and its output was unusable. Maybe it only works well on Linux? Turns out I had a connection pool size of 20 and 60 goroutines all fighting for those connections, thus the delays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants