You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a couple of arrays as global data that are built from a database. I use the Create Pages From Data trick to generate one page for each item in the array. The template (.11ty.js) that I use to generate the pages appears be called 7 times per item in the array, which seems to be slowing down my builds quite a lot.
I cannot figure out why this template is being called so often or how to fix the issue. According to Eleventy:Benchmark, template rendering accounts for almost 300,000ms of build time (7,239 calls x 40–50ms each). Well over half of those calls are coming from the 3 templates that are paginating this global data into individual pages.
Eleventy Version
0.12.1
Method for Counting Template Calls
It's possible that I've misdiagnosed the issue, so here's how I calculated the number of renders per-template:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a couple of arrays as global data that are built from a database. I use the Create Pages From Data trick to generate one page for each item in the array. The template (.11ty.js) that I use to generate the pages appears be called 7 times per item in the array, which seems to be slowing down my builds quite a lot.
I cannot figure out why this template is being called so often or how to fix the issue. According to Eleventy:Benchmark, template rendering accounts for almost 300,000ms of build time (7,239 calls x 40–50ms each). Well over half of those calls are coming from the 3 templates that are paginating this global data into individual pages.
Method for Counting Template Calls
It's possible that I've misdiagnosed the issue, so here's how I calculated the number of renders per-template:
From what I can tell in the code this is the message output whenever Eleventy renders a template.
Beta Was this translation helpful? Give feedback.
All reactions