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've been trying to figure out some slowdowns related to generating JSON indexes as described here and noticed a difference in the way that 0.31.1 and 0.42 renders Custom Output formats. 0.31.1 produces one JSON file for the entire site.
> hugo version
Hugo Static Site Generator v0.31.1 darwin/amd64 BuildDate: 2017-11-27T06:26:26-05:00
> hugo --templateMetrics
...
38.678751ms 38.678751ms 38.678751ms 1 index.json
...
> ls **/index.json
layouts/index.json public/index.json
0.42.2 renders an index.json page for every pagination page.
Calling jsonify seems to be expensive. Existing documentation says that pagination applies if the template specifies pagination but doesn't specify whether it would be applied to all index pages. Pagination is referenced in index.html but not index.json. Is there a way to exclude index.json from pagination?
This is a recent regression in Hugo, where we have started to produce `/page/30/index.json` when the main output format (usually `HTML`) is set up with pagination.
For JSON this is potentially lot of superflous work and hurts performance.
This commit reinstates the earlier behaviour: We only create paginators if in use in the main output format.
And add a test for it to prevent this from happening again.
Fixesgohugoio#4890
This is a recent regression in Hugo, where we have started to produce `/page/30/index.json` when the main output format (usually `HTML`) is set up with pagination.
For JSON this is potentially lot of superflous work and hurts performance.
This commit reinstates the earlier behaviour: We only create paginators if in use in the main output format.
And add a test for it to prevent this from happening again.
Fixes#4890
Copied by request from the Discourse forum:
I've been trying to figure out some slowdowns related to generating JSON indexes as described here and noticed a difference in the way that 0.31.1 and 0.42 renders Custom Output formats. 0.31.1 produces one JSON file for the entire site.
0.42.2 renders an index.json page for every pagination page.
Calling
jsonify
seems to be expensive. Existing documentation says that pagination applies if the template specifies pagination but doesn't specify whether it would be applied to all index pages. Pagination is referenced in index.html but not index.json. Is there a way to exclude index.json from pagination?index.json file attached.
index.json.txt
The text was updated successfully, but these errors were encountered: