Improving Build Time

Kia ora koutou,

Been using Hugo for a long time and loving it. I’ve got a Synology DS220+ at home I want to use as a (admittedly wimpy) CI build server for my website. My website is mainly blog posts about hiking - each post has a few images which I’m resizing with Hugo.

I’m looking to improve the build time, if I can. I see that Hugo stores resized images in resources/_gen for reuse on each build, great.

For this test I changed a single line on one post

Fast-forward
 content/posts/2019-02-06-mt-herbert/index.md | 1 +
 1 file changed, 1 insertion(+)

And then I ran my command to see how the build goes. It seemed to rebuild every single page, even though only one changed. Is there I way I can get Hugo to be more intelligent about this?

./hugo --verbose --destination="$HOME/CI/blog-build/" --debug
Start building sites …
hugo v0.105.0-0e3b42b4a9bdeb4d866210819fc6ddcf51582ffa+extended linux/amd64 BuildDate=2022-10-28T12:29:05Z VendorInfo=gohugoio
INFO 2022/11/16 21:51:06 syncing static files to /
DEBUG 2022/11/16 21:51:15 Render page The Lewis Tops to "/photos/2020-03-07/index.html"
DEBUG 2022/11/16 21:51:15 Render page Lyttelton Harbour to "/photos/2020-05-17/index.html"
DEBUG 2022/11/16 21:51:16 Render page Sunset at Lake Hood to "/photos/2020-06-14/index.html"
DEBUG 2022/11/16 21:51:16 Render page Mt Vernon to "/photos/2021-03-28/index.html"
DEBUG 2022/11/16 21:51:16 Render page Edwards-Hawdon - Tarn Col to "/photos/2020-06-19/index.html"
DEBUG 2022/11/16 21:51:17 Render page Autumn Sun on the Canterbury Plains to "/photos/2021-04-29/index.html"
DEBUG 2022/11/16 21:51:17 Render page Cathedral Caves to "/photos/2021-04-22/index.html"
DEBUG 2022/11/16 21:51:17 Render page Above the Clouds to "/photos/2021-06-15/index.html"
DEBUG 2022/11/16 21:51:17 Render page PyroCMS 3: Creating Themes to "/posts/pyrocms-creating-themes/index.html"
DEBUG 2022/11/16 21:51:17 Render page PyroCMS 3: JSON-LD and Breadcrumbs to "/posts/pyrocms-json-ld-breadcrumbs/index.html"
DEBUG 2022/11/16 21:51:17 Render page PyroCMS 3: Schedules & Commands to "/posts/pyrocms-schedules-and-commands/index.html"
DEBUG 2022/11/16 21:51:17 Render page PyroCMS 3: Twig Template Variables to "/posts/pyrocms-twig-template-variables/index.html"
DEBUG 2022/11/16 21:51:17 Render page Fixing Unexpected character & in the PyroCMS 3 Markdown Field to "/posts/pyrocms-fixing-unexpected-character-in-the-markdown-field/index.html"
DEBUG 2022/11/16 21:51:18 Render page OmniFocus: Using the iOS URL Scheme to "/posts/omnifocus-ios-url-scheme/index.html"
DEBUG 2022/11/16 21:51:20 Render page Double Hut to "/posts/double-hut/index.html"
DEBUG 2022/11/16 21:51:20 Render page Nina Hut Day Trip to "/posts/nina-hut-day-trip/index.html"
DEBUG 2022/11/16 21:51:24 Render page Bealey Spur to "/posts/bealey-spur/index.html"
DEBUG 2022/11/16 21:51:24 Render page Mt Herbert from Kaituna Valley to "/posts/mt-herbert-from-kaituna-valley/index.html"
DEBUG 2022/11/16 21:51:25 Render page Benmore Hut to "/posts/benmore-hut/index.html"
DEBUG 2022/11/16 21:51:25 Render page Building This Website to "/posts/building-this-website/index.html"
DEBUG 2022/11/16 21:51:25 Render page Deploying using Gitlab CI and SSH to "/posts/deploying-this-website/index.html"
DEBUG 2022/11/16 21:51:26 Render page Mt Herbert via Orton Bradley to "/posts/mt-herbert-via-orton-bradley/index.html"
DEBUG 2022/11/16 21:51:26 Render page Craigieburn Forest Park to "/posts/craigieburn-forest-park/index.html"
DEBUG 2022/11/16 21:51:27 Render page 2019 in Review to "/posts/2019-in-review/index.html"
DEBUG 2022/11/16 21:51:27 Render page Wharfedale Track & Mt Oxford to "/posts/wharfedale-track/index.html"
DEBUG 2022/11/16 21:51:28 Render page Tarn Hut to "/posts/tarn-hut/index.html"
DEBUG 2022/11/16 21:51:28 Render page Better Touch Tool & MacOS TouchBar to "/posts/better-touch-tool-macos-touchbar/index.html"
DEBUG 2022/11/16 21:51:28 Render page The Heaphy to "/posts/the-heaphy/index.html"
DEBUG 2022/11/16 21:51:29 Render page PyroCMS 3 & Laravel: setLocale Compatability Error to "/posts/set-locale-error/index.html"
DEBUG 2022/11/16 21:51:29 Render page Brass Monkey Bivvy to "/posts/brass-monkey-bivvy/index.html"
DEBUG 2022/11/16 21:51:31 Render page iPad Part One to "/posts/ipad-part-one/index.html"
DEBUG 2022/11/16 21:51:31 Render page Custom Hugo Figure Snippet to "/posts/custom-hugo-figure-snippet/index.html"
DEBUG 2022/11/16 21:51:32 Render page Using Garmin's Virtual Run for Bluetooth HR on Tacx and Zwift to "/posts/garmin-watch-bluetooth-hr-with-tacx-zwift/index.html"
DEBUG 2022/11/16 21:51:32 Render page How To Initiate Sidecar From iOS to "/posts/initiate-sidecar-from-ios/index.html"
DEBUG 2022/11/16 21:51:32 Render page LinkChecker - Detect Link Rot on Your Website to "/posts/2020-04-24-link-checker/index.html"
DEBUG 2022/11/16 21:51:32 Render page Markdown Table Generator - An Apple Shortcut to make your Markdown life easier to "/posts/markdown-table-generator/index.html"
DEBUG 2022/11/16 21:51:32 Render page Edwards-Hawdon to "/posts/edwards-hawdon/index.html"
DEBUG 2022/11/16 21:51:33 Render page Markdown Table Prettifier - A Scriptable action to make your Markdown tables more readable. to "/posts/markdown-table-prettifier/index.html"
DEBUG 2022/11/16 21:51:37 Render page Pinnacles Hut to "/posts/pinnacles-hut/index.html"
DEBUG 2022/11/16 21:51:37 Render page Camp Creek Hut to "/posts/camp-creek-hut/index.html"
DEBUG 2022/11/16 21:51:40 Render page Exploring Lake Kaniere to "/posts/exploring-lake-kaniere/index.html"
DEBUG 2022/11/16 21:51:46 Render page Mt Fyffe Loop to "/posts/mt-fyffe-loop/index.html"
DEBUG 2022/11/16 21:51:50 Render page Motatapu Track to "/posts/motatapu-track/index.html"
DEBUG 2022/11/16 21:51:51 Render page Mt Rintoul to "/posts/mt-rintoul/index.html"
DEBUG 2022/11/16 21:51:52 Render page tooDo to "/posts/toodo/index.html"
DEBUG 2022/11/16 21:51:53 Render page Mt Barossa to "/posts/mt-barossa/index.html"
DEBUG 2022/11/16 21:51:53 Render page Mt Herbert via Diamond Harbour to "/posts/mt-herbert-via-diamond-harbour/index.html"
DEBUG 2022/11/16 21:51:53 Render page Loop the Lake 2021 to "/posts/loop-the-lake-2021/index.html"
DEBUG 2022/11/16 21:51:54 Render page Lake Daniell to "/posts/lake-daniell/index.html"
DEBUG 2022/11/16 21:51:54 Render page Teaching, Pay and What Matters to "/posts/teaching-pay-and-what-matters/index.html"
DEBUG 2022/11/16 21:51:54 Render page Tautuku Hut to "/posts/tatuku-hut/index.html"
DEBUG 2022/11/16 21:51:55 Render page What Would Make a Difference? to "/posts/what-would-make-a-difference/index.html"
DEBUG 2022/11/16 21:51:56 Render page Lake Angelus Hut to "/posts/lake-angelus-hut/index.html"
DEBUG 2022/11/16 21:51:57 Render page West Coast Wilderness Trail to "/posts/west-coast-wilderness-trail/index.html"
DEBUG 2022/11/16 21:51:57 Render page Matiri Hut and Lake to "/posts/matiri-hut-and-lake/index.html"
DEBUG 2022/11/16 21:51:58 Render page Caples-Kay-Scott Loop to "/posts/caples-kay-scott-loop/index.html"
DEBUG 2022/11/16 21:52:07 Render page Boundary Creek Hut to "/posts/boundary-creek-hut/index.html"
DEBUG 2022/11/16 21:52:11 Render page CHS Run Club 2021 to "/posts/chs-run-club-2021/index.html"
DEBUG 2022/11/16 21:52:12 Render page Paparoa to "/posts/paparoa/index.html"
DEBUG 2022/11/16 21:52:13 Render page Spurs Hut to "/posts/spurs-hut/index.html"
DEBUG 2022/11/16 21:52:20 Render page Rakiura North West Circuit to "/posts/rakiura-north-west-circuit/index.html"
DEBUG 2022/11/16 21:52:27 Render page Snowy Gorge - Maitland to "/posts/snowy-gorge-maitland/index.html"
DEBUG 2022/11/16 21:52:38 Render page Lagoon-Cass Track to "/posts/lagoon-cass-track/index.html"
DEBUG 2022/11/16 21:52:40 Render page Collective Bargining in 2022 to "/posts/collective-bargining-in-2022/index.html"
DEBUG 2022/11/16 21:52:40 Render page Exit Interview: Apple Watch Series 2 to "/posts/exit-interview-apple-watch-series-2/index.html"
DEBUG 2022/11/16 21:52:41 Render page Exit Interview: Kindle Paperwhite 2 (2013) to "/posts/exit-interview-kindle-paperwhite-2-2013/index.html"
DEBUG 2022/11/16 21:52:41 Render page Coast to Coast 2022 to "/posts/coast-to-coast-2022/index.html"
DEBUG 2022/11/16 21:52:41 Render page Thoughts on Racing to "/posts/thoughts-on-racing/index.html"
DEBUG 2022/11/16 21:52:41 Render page Pakituhi - Stody's - Moonlight and Roses to "/posts/pakituhi-stodys-moonlight-and-roses/index.html"
DEBUG 2022/11/16 21:52:42 Render page Mt Rolleston Attempt to "/posts/mt-rolleston-attempt/index.html"
DEBUG 2022/11/16 21:52:43 Render page CHS Run Club 2022 to "/posts/chs-run-club-2022/index.html"
DEBUG 2022/11/16 21:52:45 Render page Packrafting the Waimak to "/posts/packrafting-the-waimak/index.html"
DEBUG 2022/11/16 21:52:57 Render page Jam Hut & The Clarence Packraft to "/posts/jam-clarence-packraft/index.html"
DEBUG 2022/11/16 21:53:02 Render page Abel Tasman to "/posts/abel-tasman/index.html"
DEBUG 2022/11/16 21:53:05 Render page Journey to 100km: A Wobbly Start to "/posts/2022-06-11/index.html"
DEBUG 2022/11/16 21:53:32 Render page The Kepler to "/posts/the-kepler/index.html"
DEBUG 2022/11/16 21:53:33 Render page Lake Man Circuit to "/posts/lake-man-circuit/index.html"
DEBUG 2022/11/16 21:53:39 Render page Gone to "/reading/2021-10-21-gone/index.html"
DEBUG 2022/11/16 21:53:39 Render page Farseer Trilogy to "/reading/2021-11-07-farseer-trilogy/index.html"
DEBUG 2022/11/16 21:53:39 Render page Bad Astronomy to "/reading/2021-11-10-bad-astronomy/index.html"
DEBUG 2022/11/16 21:53:39 Render page Snow Crash to "/reading/2021-12-13-snow-crash/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Selfish Gene to "/reading/2021-12-17-the-selfish-gene/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Mindful Way Through Depression to "/reading/2021-12-30-the-mindful-way-through-depression/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Age of Five Trilogy to "/reading/2022-01-11-the-age-of-five-trilogy/index.html"
DEBUG 2022/11/16 21:53:39 Render page Bad Pharma to "/reading/2022-01-18-bad-pharma/index.html"
DEBUG 2022/11/16 21:53:39 Render page Dune Messiah to "/reading/2022-01-19-dune-messiah/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Sixth Extinction to "/reading/2022-02-02-the-sixth-extinction/index.html"
DEBUG 2022/11/16 21:53:39 Render page Foundation to "/reading/2022-02-06-foundation/index.html"
DEBUG 2022/11/16 21:53:39 Render page How To Be A Stoic to "/reading/2022-03-05-how-to-be-a-stoic/index.html"
DEBUG 2022/11/16 21:53:39 Render page Foundation and Empire to "/reading/2022-03-06-foundation-and-empire/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Champions Mind to "/reading/2022-03-19-the-champions-mind/index.html"
DEBUG 2022/11/16 21:53:39 Render page Second Foundation to "/reading/2022-03-22-second-foundation/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Best of Best New Zealand Poems to "/reading/2022-03-28-the-best-of-best-new-zealand-poems/index.html"
DEBUG 2022/11/16 21:53:39 Render page Bad Blood to "/reading/2022-04-05-bad-blood/index.html"
DEBUG 2022/11/16 21:53:39 Render page Foundation's Edge to "/reading/2022-04-11-foundations-edge/index.html"
DEBUG 2022/11/16 21:53:39 Render page Eat and Run to "/reading/2022-04-24-eat-and-run/index.html"
DEBUG 2022/11/16 21:53:39 Render page Foundation and Earth to "/reading/2022-04-30-foundation-and-earth/index.html"
DEBUG 2022/11/16 21:53:39 Render page King of Ashes to "/reading/2022-04-30-king-of-ashes.md/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Hot Zone to "/reading/2022-05-03-the-hot-zone/index.html"
DEBUG 2022/11/16 21:53:39 Render page Children of Dune to "/reading/2022-06-11-children-of-dune/index.html"
DEBUG 2022/11/16 21:53:39 Render page Davos Man to "/reading/2022-07-18-davos-man/index.html"
DEBUG 2022/11/16 21:53:39 Render page Empire of Pain to "/reading/2022-07-18-empire-of-pain/index.html"
DEBUG 2022/11/16 21:53:39 Render page Avalanche Awareness to "/reading/2022-07-19-avalanche-awareness/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Hill We Climb to "/reading/2022-07-19-the-hill-we-climb/index.html"
DEBUG 2022/11/16 21:53:39 Render page The Road to "/reading/2022-07-19-the-road/index.html"
DEBUG 2022/11/16 21:53:40 Render page Twenty Thousand Leagues Under the Sea to "/reading/2022-07-28-twenty-thousand-leagues-under-the-sea/index.html"
DEBUG 2022/11/16 21:53:40 Render page Solo to "/reading/2022-08-02-solo/index.html"
DEBUG 2022/11/16 21:53:40 Render page A Life on Our Planet to "/reading/2022-08-06-a-life-on-our-planet/index.html"
DEBUG 2022/11/16 21:53:40 Render page God Emperor of Dune to "/reading/2022-08-16-god-emperor-of-dune/index.html"
DEBUG 2022/11/16 21:53:40 Render page Poetry to "/reading/2022-08-30-poetry/index.html"
DEBUG 2022/11/16 21:53:40 Render page Heretics of Dune to "/reading/2022-09-04-heretics-of-dune/index.html"
DEBUG 2022/11/16 21:53:40 Render page Chapterhouse: Dune to "/reading/2022-10-16-chapterhouse-dune/index.html"
DEBUG 2022/11/16 21:53:40 Render page Relentless to "/reading/2022-10-19-relentless/index.html"
DEBUG 2022/11/16 21:53:40 Render page The Conquest of Mt Cook to "/reading/2022-10-23-the-conquest-of-mt-cook/index.html"
DEBUG 2022/11/16 21:53:40 Render page South! to "/reading/2022-11-06-south/index.html"
DEBUG 2022/11/16 21:53:40 Render page The Art of Living to "/reading/2022-11-06-the-art-of-living/index.html"
DEBUG 2022/11/16 21:53:40 Render page No One Is Too Small To Make A Difference to "/reading/2022-11-14-no-one-is-too-small-to-make-a-difference/index.html"
DEBUG 2022/11/16 21:53:40 Render page Waking Up to "/reading/2022-11-14-waking-up/index.html"
DEBUG 2022/11/16 21:53:40 Render page  to "/index.html"
DEBUG 2022/11/16 21:53:40 Render page Photo Blog to "/photos/index.html"
DEBUG 2022/11/16 21:53:40 Render page Writing to "/posts/index.html"
DEBUG 2022/11/16 21:53:40 Render page Reading to "/reading/index.html"
DEBUG 2022/11/16 21:53:40 Render page Series to "/series/index.html"
DEBUG 2022/11/16 21:53:41 Render page Journey to 100 to "/series/journey-to-100/index.html"
DEBUG 2022/11/16 21:53:58 Render page Lake Morgan to "/posts/lake-morgan/index.html"
DEBUG 2022/11/16 21:54:01 Render XML for "sitemap" to "/sitemap.xml"
DEBUG 2022/11/16 21:54:01 Render 404 page to "/404.html"
DEBUG 2022/11/16 21:54:01 Render page  to "/index.xml"
DEBUG 2022/11/16 21:54:01 Render page Photo Blog to "/photos/index.xml"
DEBUG 2022/11/16 21:54:01 Render page Writing to "/posts/index.xml"
DEBUG 2022/11/16 21:54:01 Render page Reading to "/reading/index.xml"
DEBUG 2022/11/16 21:54:01 Render page Series to "/series/index.xml"
DEBUG 2022/11/16 21:54:01 Render page Journey to 100 to "/series/journey-to-100/index.xml"
DEBUG 2022/11/16 21:54:01 Render page The Lewis Tops to "/photos/2020-03-07/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Lyttelton Harbour to "/photos/2020-05-17/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Sunset at Lake Hood to "/photos/2020-06-14/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Edwards-Hawdon - Tarn Col to "/photos/2020-06-19/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Vernon to "/photos/2021-03-28/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Cathedral Caves to "/photos/2021-04-22/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Autumn Sun on the Canterbury Plains to "/photos/2021-04-29/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Above the Clouds to "/photos/2021-06-15/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Nina Hut Day Trip to "/posts/nina-hut-day-trip/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page PyroCMS 3: Creating Themes to "/posts/pyrocms-creating-themes/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page PyroCMS 3: JSON-LD and Breadcrumbs to "/posts/pyrocms-json-ld-breadcrumbs/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page PyroCMS 3: Schedules & Commands to "/posts/pyrocms-schedules-and-commands/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page PyroCMS 3: Twig Template Variables to "/posts/pyrocms-twig-template-variables/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Fixing Unexpected character & in the PyroCMS 3 Markdown Field to "/posts/pyrocms-fixing-unexpected-character-in-the-markdown-field/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page OmniFocus: Using the iOS URL Scheme to "/posts/omnifocus-ios-url-scheme/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Double Hut to "/posts/double-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Bealey Spur to "/posts/bealey-spur/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Herbert from Kaituna Valley to "/posts/mt-herbert-from-kaituna-valley/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Benmore Hut to "/posts/benmore-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Building This Website to "/posts/building-this-website/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Deploying using Gitlab CI and SSH to "/posts/deploying-this-website/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Herbert via Orton Bradley to "/posts/mt-herbert-via-orton-bradley/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Pinnacles Hut to "/posts/pinnacles-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Craigieburn Forest Park to "/posts/craigieburn-forest-park/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page 2019 in Review to "/posts/2019-in-review/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Wharfedale Track & Mt Oxford to "/posts/wharfedale-track/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Tarn Hut to "/posts/tarn-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Better Touch Tool & MacOS TouchBar to "/posts/better-touch-tool-macos-touchbar/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Heaphy to "/posts/the-heaphy/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page PyroCMS 3 & Laravel: setLocale Compatability Error to "/posts/set-locale-error/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Brass Monkey Bivvy to "/posts/brass-monkey-bivvy/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page iPad Part One to "/posts/ipad-part-one/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Custom Hugo Figure Snippet to "/posts/custom-hugo-figure-snippet/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Using Garmin's Virtual Run for Bluetooth HR on Tacx and Zwift to "/posts/garmin-watch-bluetooth-hr-with-tacx-zwift/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page How To Initiate Sidecar From iOS to "/posts/initiate-sidecar-from-ios/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page LinkChecker - Detect Link Rot on Your Website to "/posts/2020-04-24-link-checker/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Markdown Table Generator - An Apple Shortcut to make your Markdown life easier to "/posts/markdown-table-generator/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Edwards-Hawdon to "/posts/edwards-hawdon/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Markdown Table Prettifier - A Scriptable action to make your Markdown tables more readable. to "/posts/markdown-table-prettifier/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Camp Creek Hut to "/posts/camp-creek-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Exploring Lake Kaniere to "/posts/exploring-lake-kaniere/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Motatapu Track to "/posts/motatapu-track/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Fyffe Loop to "/posts/mt-fyffe-loop/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Rintoul to "/posts/mt-rintoul/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Herbert via Diamond Harbour to "/posts/mt-herbert-via-diamond-harbour/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page tooDo to "/posts/toodo/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Barossa to "/posts/mt-barossa/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page West Coast Wilderness Trail to "/posts/west-coast-wilderness-trail/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Loop the Lake 2021 to "/posts/loop-the-lake-2021/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Lake Daniell to "/posts/lake-daniell/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Teaching, Pay and What Matters to "/posts/teaching-pay-and-what-matters/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Tautuku Hut to "/posts/tatuku-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page What Would Make a Difference? to "/posts/what-would-make-a-difference/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Lake Angelus Hut to "/posts/lake-angelus-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Matiri Hut and Lake to "/posts/matiri-hut-and-lake/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Caples-Kay-Scott Loop to "/posts/caples-kay-scott-loop/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Rakiura North West Circuit to "/posts/rakiura-north-west-circuit/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Boundary Creek Hut to "/posts/boundary-creek-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page CHS Run Club 2021 to "/posts/chs-run-club-2021/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Paparoa to "/posts/paparoa/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Spurs Hut to "/posts/spurs-hut/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Snowy Gorge - Maitland to "/posts/snowy-gorge-maitland/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Pakituhi - Stody's - Moonlight and Roses to "/posts/pakituhi-stodys-moonlight-and-roses/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Lagoon-Cass Track to "/posts/lagoon-cass-track/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Collective Bargining in 2022 to "/posts/collective-bargining-in-2022/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Exit Interview: Apple Watch Series 2 to "/posts/exit-interview-apple-watch-series-2/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Exit Interview: Kindle Paperwhite 2 (2013) to "/posts/exit-interview-kindle-paperwhite-2-2013/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Coast to Coast 2022 to "/posts/coast-to-coast-2022/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Thoughts on Racing to "/posts/thoughts-on-racing/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Mt Rolleston Attempt to "/posts/mt-rolleston-attempt/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page CHS Run Club 2022 to "/posts/chs-run-club-2022/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Packrafting the Waimak to "/posts/packrafting-the-waimak/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Jam Hut & The Clarence Packraft to "/posts/jam-clarence-packraft/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Abel Tasman to "/posts/abel-tasman/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Journey to 100km: A Wobbly Start to "/posts/2022-06-11/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Kepler to "/posts/the-kepler/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Lake Man Circuit to "/posts/lake-man-circuit/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Lake Morgan to "/posts/lake-morgan/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Gone to "/reading/2021-10-21-gone/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Farseer Trilogy to "/reading/2021-11-07-farseer-trilogy/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Bad Astronomy to "/reading/2021-11-10-bad-astronomy/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Snow Crash to "/reading/2021-12-13-snow-crash/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Selfish Gene to "/reading/2021-12-17-the-selfish-gene/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Mindful Way Through Depression to "/reading/2021-12-30-the-mindful-way-through-depression/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Age of Five Trilogy to "/reading/2022-01-11-the-age-of-five-trilogy/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Bad Pharma to "/reading/2022-01-18-bad-pharma/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Dune Messiah to "/reading/2022-01-19-dune-messiah/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Sixth Extinction to "/reading/2022-02-02-the-sixth-extinction/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Foundation to "/reading/2022-02-06-foundation/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page How To Be A Stoic to "/reading/2022-03-05-how-to-be-a-stoic/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Foundation and Empire to "/reading/2022-03-06-foundation-and-empire/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Champions Mind to "/reading/2022-03-19-the-champions-mind/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Second Foundation to "/reading/2022-03-22-second-foundation/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Best of Best New Zealand Poems to "/reading/2022-03-28-the-best-of-best-new-zealand-poems/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Bad Blood to "/reading/2022-04-05-bad-blood/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Foundation's Edge to "/reading/2022-04-11-foundations-edge/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Eat and Run to "/reading/2022-04-24-eat-and-run/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Foundation and Earth to "/reading/2022-04-30-foundation-and-earth/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page King of Ashes to "/reading/2022-04-30-king-of-ashes.md/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Hot Zone to "/reading/2022-05-03-the-hot-zone/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Children of Dune to "/reading/2022-06-11-children-of-dune/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Davos Man to "/reading/2022-07-18-davos-man/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Empire of Pain to "/reading/2022-07-18-empire-of-pain/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Avalanche Awareness to "/reading/2022-07-19-avalanche-awareness/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Hill We Climb to "/reading/2022-07-19-the-hill-we-climb/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Road to "/reading/2022-07-19-the-road/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Twenty Thousand Leagues Under the Sea to "/reading/2022-07-28-twenty-thousand-leagues-under-the-sea/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Solo to "/reading/2022-08-02-solo/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page A Life on Our Planet to "/reading/2022-08-06-a-life-on-our-planet/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page God Emperor of Dune to "/reading/2022-08-16-god-emperor-of-dune/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Poetry to "/reading/2022-08-30-poetry/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Heretics of Dune to "/reading/2022-09-04-heretics-of-dune/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Chapterhouse: Dune to "/reading/2022-10-16-chapterhouse-dune/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Relentless to "/reading/2022-10-19-relentless/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Conquest of Mt Cook to "/reading/2022-10-23-the-conquest-of-mt-cook/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page South! to "/reading/2022-11-06-south/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page The Art of Living to "/reading/2022-11-06-the-art-of-living/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page No One Is Too Small To Make A Difference to "/reading/2022-11-14-no-one-is-too-small-to-make-a-difference/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page Waking Up to "/reading/2022-11-14-waking-up/index.gmi"
DEBUG 2022/11/16 21:54:01 Render page  to "/index.gmi"

                   | EN
-------------------+------
  Pages            | 252
  Paginator pages  |   0
  Non-page files   | 468
  Static files     | 180
  Processed images | 971
  Aliases          |   0
  Sitemaps         |   1
  Cleaned          |   0

Total in 176297 ms

Many thanks in advance for any thoughts you might have!

1 Like

Hugo cannot build your site incrementally when you run the hugo command. There’s some discussion of it here:
https://github.com/gohugoio/hugo/issues/1643

If I read the Synology specs correctly: 2-core 2.0 GHz. Ouch. I’d build locally and push the published files. Assuming your processed images and static files are each 200 KB, your published site would be less than 250 MB. And the Synology specs state “192 MB/s sequential write throughput*”. So it seems like this would be a much faster approach.

Ah, I understand the not building incrementally. That makes a deal of sense - it looks like quite the challenge!

If I output some metrics (which I just learned about) I can see it gets pretty hung up on the rendering of images using my figure shortcode.

./hugo --config="config.toml" --verbose --templateMetrics --templateMetricsHints --destination="$HOME/CI/blog-build/"

Start building sites … 
hugo v0.105.0-0e3b42b4a9bdeb4d866210819fc6ddcf51582ffa+extended linux/amd64 BuildDate=2022-10-28T12:29:05Z VendorInfo=gohugoio
INFO 2022/11/17 10:18:26 syncing static files to /

Template Metrics:

     cumulative       average       maximum      cache  percent  cached  total  
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
  1m11.615882545s  1.627633694s   9.94910313s          0        0       0     44  post/gps.html
  1m6.454959753s   222.25739ms  1.759702087s          0        0       0    299  shortcodes/figure.html
   6.203503587s   49.234155ms  817.619807ms         25        0       0    126  partials/header.html
   4.813206512s  185.123327ms  1.947282612s          0        0       0     26  _default/single.html
   2.231868358s    8.454046ms  1.426612114s         20        0       0    264  partials/statsTable.html
   1.819076696s  227.384587ms  646.433324ms          0        0       0      8  photos/single.html
   267.073634ms   53.414726ms    61.92847ms          0        0       0      5  _default/rss.xml
    96.232826ms    2.830377ms    61.45535ms          0        0       0     34  _default/single.gmi
    86.190871ms    1.958883ms   10.374626ms          0        0       0     44  post/gps.gmi
    81.214787ms   81.214787ms   81.214787ms          0        0       0      1  _default/home.html
    73.835495ms     620.466µs    7.290167ms          1        0       0    119  partials/gmiContent.html
    73.216212ms    1.785761ms   13.063812ms          0        0       0     41  post/reading.html
    64.788534ms     539.904µs   61.081606ms        100        0       0    120  partials/header.gmi
    20.619877ms     502.923µs    2.726075ms          0        0       0     41  post/reading.gmi
    18.946812ms   18.946812ms   18.946812ms          0        0       0      1  _internal/shortcodes/highlight.html
    14.533722ms   14.533722ms   14.533722ms          0        0       0      1  section/reading.html
     9.982852ms     207.976µs     424.892µs         45        0       0     48  partials/rss-figure.html
     6.114124ms    6.114124ms    6.114124ms          0        0       0      1  _internal/_default/sitemap.xml
     5.835439ms      46.313µs     432.784µs         60        0       0    126  partials/footer.html
     3.999364ms    3.999364ms    3.999364ms          0        0       0      1  section/photos.rss.xml
      3.83712ms     3.83712ms     3.83712ms          0        0       0      1  section/posts.html
     3.441363ms    1.720681ms    2.304312ms          0        0       0      2  _default/list.html
     3.140804ms    3.140804ms    3.140804ms          0        0       0      1  _default/home.gmi
     3.136626ms    3.136626ms    3.136626ms          0        0       0      1  404.html
     2.633854ms    2.633854ms    2.633854ms          0        0       0      1  section/photos.html
     2.583442ms      21.528µs     219.436µs         87        0       0    120  partials/footer.gmi
     2.067728ms     187.975µs     308.209µs          0        0       0     11  shortcodes/stats.html


                   | EN   
-------------------+------
  Pages            | 252  
  Paginator pages  |   0  
  Non-page files   | 468  
  Static files     | 180  
  Processed images | 971  
  Aliases          |   0  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 157243 ms

Unfortunately, I have been using full-size images because I like having the highest resolution available. A typical image is perhaps 18mb which gets resized like so:

 21K Nov 15 19:07 IMG_8557_5781154771562875925.json
 77K Nov 15 19:07 IMG_8557_huf8b8afb01b35eff7d64b3c81eb2b6a33_18443887_1024x0_resize_q75_h2_box.webp
296K Nov 15 19:07 IMG_8557_huf8b8afb01b35eff7d64b3c81eb2b6a33_18443887_2048x0_resize_q75_h2_box.webp
 22K Nov 15 19:07 IMG_8557_huf8b8afb01b35eff7d64b3c81eb2b6a33_18443887_512x0_resize_q75_h2_box.webp

I resize it with a shortcode like this:

{{ $img := (index (.Page.Resources.Match (print (.Get "name") ".*")) 0) }}
{{ $img512 := $img.Resize "512x webp" }}
{{ $img1024 := $img.Resize "1024x webp" }}
{{ $img2048 := $img.Resize "2048x webp" }}

<figure
    {{ with $img.Exif }}
    data-lat="{{ .Lat }}"
    data-lng="{{ .Long }}"
    data-fig="{{ $img.Name }}"
    {{ end }}>
    <a href='{{ $img.Permalink }}' title='Full size image: {{ .Get "title" }}'>
        <img 
            srcset='
                {{ $img512.Permalink }} {{ $img512.Width }}w,
                {{ $img1024.Permalink }} {{ $img1024.Width }}w,
                {{ $img2048.Permalink }} {{ $img2048.Width }}w'
            sizes="(min-width: 780px) 584px, calc(100vw - 16px)"
            height="{{ $img.Height }}"
            width="{{ $img.Width }}"
            src='{{ $img.Permalink }}'
            alt='{{ .Get "title" }}'
            loading="lazy"/>
    </a>
    <figcaption>(📷: {{ if .Get "author" }}{{ .Get "author" | markdownify }}{{ else }}Finn Le Sueur{{ end }}) {{ .Get "title" | markdownify }}</figcaption>
</figure>

I suppose the only thing to do would be to not use full-res images? My website build output is 3.9gb.

I have previously been rendering locally on my laptop, but I’d like to use my Synology as a build server so I can write posts etc. from other devices like my phone or iPad where I’m not able to build locally.

Clearly I’m not going to lose out by waiting a couple minutes, but I thought it was worth asking. :slight_smile:

What’s that? 72 seconds of your build.

That’s the layout template that generates my hiking blog posts. Makes a page like this: Lake Morgan | Finn Le Sueur. I can’t actually tell what is making that template so slow?

{{ partial "header.html" . }}

<div class="content">
    <h1>{{ .Title | markdownify }}</h1>
    <p>Activity Date: {{ with .Params.date }}<time>{{ time.Format "2 Jan 2006" . }}</time>{{ end }}<br/>
    {{ with .GitInfo }}Updated: <time>{{ .AuthorDate.Format "2 Jan 2006" }}</time>{{ end }}</p>

    {{ if ne .Params.statsTable false }}
    {{ partial "statsTable.html" . }}
    {{ end }}

    {{ .Content }}
</div>

<script>
    var GPXFiles = [
        {{ range sort (.Resources.Match "*.gpx") }}
            "{{ .Permalink }}",
        {{ end }}
        ],

        GPXDataFiles = [
        {{ range sort (.Resources.Match "*.gpx") }}
            "{{ $.Site.BaseURL }}/tracks/{{ index (split .Title ".") 0 }}.json",
        {{ end }}
        ];
</script>

<style>{{ readFile "/themes/hugo-finn/static/css/mod-gps.css" | safeCSS }}</style>
<link rel="stylesheet" href="/css/leaflet.min.css"/>
<script src="/js/leaflet.min.js"></script>
<script src="/js/Polyline.encoded.js"></script> 
<script src='/js/Leaflet.fullscreen.min.js'></script>
<link href="/css/leaflet-fullscreen.min.css" rel="stylesheet"/>
<script src="/js/multiHike.js" async></script>

{{ partial "footer.html" . }}

Try taking this out and see what happens.

It shouldn’t be there anyway. According to specs style elements must be inside of the head element.

Ah, true, I had moved it to see if I could increase the non-blocking render time of my pages.

Taking it out doesn’t appear to have much effect.

./hugo --config="config.toml" --verbose --templateMetrics --templateMetricsHints --destination="$HOME/CI/blog-build/"
Start building sites … 
hugo v0.105.0-0e3b42b4a9bdeb4d866210819fc6ddcf51582ffa+extended linux/amd64 BuildDate=2022-10-28T12:29:05Z VendorInfo=gohugoio
INFO 2022/11/17 11:37:37 syncing static files to /

Template Metrics:

     cumulative       average       maximum      cache  percent  cached  total  
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
  1m28.544141978s  2.012366863s  8.889995665s          0        0       0     44  post/gps.html
  1m18.558334828s  262.736905ms   1.41887295s          0        0       0    299  shortcodes/figure.html
...

Start taking out other bits, one at a time.

I notice that you’re ranging through the same collection twice. If taking out of them reduces time, you could consolidate into one range, appending to string vars with newlines, then dump the vars after ranging.

Also try taking out the .GitInfo access. Maybe that’s slugish on your NAS.

Good thoughts. for the post/gps.html template:

  1. Removing one of the loops has a negligible effect
  2. Removing the .GitInfo has a negligible effect
  3. Removing {{ .Content }} drops the rendering time to 17.06759274s (seems not negotiable though! Haha)
  4. Removing the stats table partial has a negligible effect
  5. Removing the readFile statement has a negligible effect

I’ll keep searching but I think it might just be something to live with.