-
Notifications
You must be signed in to change notification settings - Fork 12
improves template rendering performance #644
Conversation
reduce the overall rendering time by ~75% via the following: - cache the entirely-static footer partial - eliminate looping over all talks in speaker page - eliminate looping over all speakers in talk page
I'm not sure if I understand entirely how this cache would interact with the Twitter widget in the footer. If the Twitter box can't update until our site builds again, that wouldn't be ideal. |
This is super cool. I want to take a little time with this to make sure I can't break it (muhahaha) and @mattstratton is unavoidably AFK until probably Thursday, but I should be able to get this tested enough to merge before that (and he can do a release after that). |
Thanks @tgross! This is all so awesome. I’m sure there a lots of examples where I was inefficient. Thank you so much!! |
I think that just means the evaluation in the partial isn’t run when building every single page since it’s identical in every single page. |
Thanks, @tgross! I ran this locally, and you're totally right about the speedup; the currently- code finishes in And (as expected) it produces the desired results. Hooray! |
Obviously we've merged this at this point but just in case someone else is reading this: the Twitter widget is client-side in Javascript so we can safely pass the same script to everyone and it'll be up-to-date. |
The performance improvement in devopsdays#644 to the speaker page implicitly (and incorrectly) assumes that a speaker will give a single talk per event. Rather than using .GetPage which can return only a single page, we can change the original call to .Site.Pages and get the correct behavior with at least some of the performance improvement. This could be further improved if the program YAML included the event name, or if Hugo supported a "contains" or "startswith" operator in the where function. Fixes devopsdays#643 (comment) Replaces devopsdays-web f944fea71d071b959f715e9cdcb0ebb00f52c978
The performance improvement in devopsdays#644 to the speaker page implicitly (and incorrectly) assumes that a speaker will give a single talk per event. Rather than using .GetPage which can return only a single page, we can change the original call to .Site.Pages and get the correct behavior with at least some of the performance improvement. This could be further improved if the program YAML included the event name, or if Hugo supported a "contains" or "startswith" operator in the where function. Fixes devopsdays#643 (comment) Replaces devopsdays-web f944fea71d071b959f715e9cdcb0ebb00f52c978
For #643
Reduce the overall rendering time by ~75% via the following:
This change is