darthmall / 11ty-paged-data-perf-example

Minimal example of creating pages from data that results in excessive calls to rendering template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eleventy Paged Data Performance Example

This project provides the minimal configuration necessary to see the the number of times a single template is called when implementing the create pages from data pattern in Eleventy.

Running

For convenience, you can run npm run benchmark to see the performance output from Eleventy. The important thing to note is that the aggregate benchmarks for both Template Compile and Template Render were called 20 times even though only 4 files were written.

You can see what's going by run DEBUG=Dev:Eleventy:TemplateContent npm run build 2>&1 | grep 'rendered content' which will you that the ./src/possum.md is being called 20 times.

About

Minimal example of creating pages from data that results in excessive calls to rendering template