Hint on how to make website generation faster?

Hi,

I created a website with 15097 pages.
I’m using Hugo 0.123.0
It takes about 2 minutes to build and require a lot of RAM.

I feel like I request Hugo to create quite a lot of internal links, and that it consumes a lot of processing time.
Is there some easy steps I should look at to reduce the build time?
For example, there is no need for rss on this website, since this is not a blog or news focused website.
Should I make the effort to update Hugo to a newer version? Does it worth it?

The content can be downloaded here: https://jibecfed.fedorapeople.org/partage/2025-12-19-website.zip (I removed big files in static folders, removing it have no impact on the RAM/time)
The full website is published there: https://communityhealth.languages-in-floss.eu
The source code is available here: jibecfed/localization-statistics: Global statistics on translation levels of fedora products - Codeberg.org

Here is the output of hugo (I’m running it on Fedora Linux)

$ time ../hugo -v --templateMetrics --templateMetricsHints
WARN  deprecated: --verbose was deprecated in Hugo v0.114.0 and will be removed in a future release. use --logLevel info
Start building sites … 
hugo v0.123.0-3c8a4713908e48e6523f058ca126710397aa4ed5 linux/amd64 BuildDate=2024-02-19T16:32:38Z VendorInfo=gohugoio

INFO  build:  step process substep collect files 5000 files_total 5000 duration 3.255422686s
INFO  build:  step process substep collect files 9808 files_total 14808 duration 2.557274914s
INFO  build:  step process duration 5.813059655s
INFO  build:  step assemble duration 271.885476ms
INFO  static: syncing static files to / duration 6.097209899s
INFO  deprecated: .Site.LastChange was deprecated in Hugo v0.123.0 and will be removed in a future release. Use .Site.Lastmod instead.
INFO  dynacache: adjusted partitions' max size evicted 4591 numGC 23 limit 3.87 GB alloc 3.92 GB totalAlloc 8.25 GB
INFO  dynacache: adjusted partitions' max size evicted 4590 numGC 26 limit 3.87 GB alloc 6.48 GB totalAlloc 16.96 GB
INFO  dynacache: adjusted partitions' max size evicted 13639 numGC 28 limit 3.87 GB alloc 5.22 GB totalAlloc 22.11 GB
INFO  dynacache: adjusted partitions' max size evicted 17705 numGC 42 limit 3.87 GB alloc 4.93 GB totalAlloc 55.96 GB
INFO  dynacache: adjusted partitions' max size evicted 11860 numGC 51 limit 3.87 GB alloc 4.55 GB totalAlloc 75.36 GB
INFO  build:  step render substep pages site en outputFormat html duration 32.612506706s
INFO  dynacache: adjusted partitions' max size evicted 9183 numGC 58 limit 3.87 GB alloc 5.40 GB totalAlloc 89.94 GB
INFO  dynacache: adjusted partitions' max size evicted 9181 numGC 67 limit 3.87 GB alloc 5.72 GB totalAlloc 109.58 GB
INFO  dynacache: adjusted partitions' max size evicted 6851 numGC 77 limit 3.87 GB alloc 5.53 GB totalAlloc 131.22 GB
INFO  dynacache: adjusted partitions' max size evicted 4184 numGC 87 limit 3.87 GB alloc 5.07 GB totalAlloc 152.16 GB
INFO  dynacache: adjusted partitions' max size evicted 984 numGC 97 limit 3.87 GB alloc 6.14 GB totalAlloc 177.96 GB
INFO  dynacache: adjusted partitions' max size evicted 2555 numGC 143 limit 3.87 GB alloc 6.89 GB totalAlloc 300.16 GB
INFO  dynacache: adjusted partitions' max size evicted 2744 numGC 153 limit 3.87 GB alloc 4.67 GB totalAlloc 323.94 GB
INFO  dynacache: adjusted partitions' max size evicted 2354 numGC 162 limit 3.87 GB alloc 5.60 GB totalAlloc 347.17 GB
INFO  dynacache: adjusted partitions' max size evicted 9233 numGC 174 limit 3.87 GB alloc 4.86 GB totalAlloc 375.81 GB
INFO  build:  step render substep pages site en outputFormat rss duration 1m4.41267451s
INFO  build:  step render pages 15097 content 47094 duration 1m37.037714078s
INFO  build:  step postProcess duration 46.32µs

Template Metrics:

     cumulative       average       maximum      cache  percent  cached  total  
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
  6m48.813004134s  1.444568919s  1m3.99938405s          0        0       0    283  _internal/_default/rss.xml
  1m56.541027337s    8.021269ms  726.462981ms          0        0       0  14529  _default/single.html
  1m18.546736017s      20.118µs  345.433481ms          0        0       0  3904299  _internal/shortcodes/ref.html
   5.780843102s     390.254µs   99.307534ms         46        0       0  14813  partials/head.html
   2.384313473s     160.982µs   20.551388ms         69        0       0  14811  partials/breadcrumb.html
   517.768592ms      39.979µs   57.412876ms          0        0       0  12951  shortcodes/resource.html
   442.307664ms   63.186809ms    93.51695ms          0        0       0      7  _default/list_packages.html
   442.038842ms      29.843µs    3.335244ms         58        0       0  14812  partials/header.html
   391.162132ms    1.504469ms    18.85302ms          0        0       0    260  territories/term.html
   263.880004ms  263.880004ms  263.880004ms          0        0       0      1  _internal/_default/sitemap.xml
    117.74572ms       7.948µs   10.027127ms        100      100   14812  14813  partials/nav.html
   116.474136ms       7.862µs   46.646476ms        100      100   14812  14813  partials/head_custom.html
   115.902269ms   16.557467ms   42.791204ms          0        0       0      7  _default/list_languages.html
    77.930459ms   77.930459ms   77.930459ms          0        0       0      1  territories/list.html
    64.172382ms       4.332µs    3.777656ms        100      100   14812  14813  partials/footer.html
    21.860609ms    3.122944ms   10.834354ms          0        0       0      7  _default/release.html
    15.499478ms   15.499478ms   15.499478ms          0        0       0      1  index.html
     6.201637ms    6.201637ms    6.201637ms          0        0       0      1  404.html
       44.686µs      44.686µs      44.686µs        100        0       0      1  partials/footer_custom.html

INFO  build:  duration 1m43.126349614s

                   |  EN    
-------------------+--------
  Pages            | 15097  
  Paginator pages  |     0  
  Non-page files   |     0  
  Static files     |  2161  
  Processed images |     0  
  Aliases          |     0  
  Cleaned          |     0  

Total in 103491 ms

real	1m43,996s
user	8m32,757s
sys	0m22,275s

Do you need RSS for all the 15000+ pages? A lot of time is spent on building the feed.

See the “cache potential” column, partials with score 100 can be called with partialCached.

It should be fairly easy, why not start there.

Also, if you don’t need RSS, add this to your config:

disableKinds = ["rss"]

Removing RSS indeed really improves the processing time, thank you :slight_smile:
The total alloc memory were also reduced from 365GB to 65GB

$ time ../hugo -v --templateMetrics --templateMetricsHints
WARN  deprecated: --verbose was deprecated in Hugo v0.114.0 and will be removed in a future release. use --logLevel info
Start building sites … 
hugo v0.123.0-3c8a4713908e48e6523f058ca126710397aa4ed5 linux/amd64 BuildDate=2024-02-19T16:32:38Z VendorInfo=gohugoio

INFO  build:  step process substep collect files 3000 files_total 3000 duration 3.000225924s
INFO  build:  step process substep collect files 4000 files_total 7000 duration 3.593375756s
INFO  build:  step process substep collect files 3000 files_total 10000 duration 3.223247197s
INFO  build:  step process substep collect files 3000 files_total 13000 duration 3.352174626s
INFO  build:  step process substep collect files 1808 files_total 14808 duration 929.396498ms
INFO  build:  step process duration 14.098972874s
INFO  build:  step assemble duration 246.053569ms
INFO  deprecated: .Site.LastChange was deprecated in Hugo v0.123.0 and will be removed in a future release. Use .Site.Lastmod instead.
INFO  dynacache: adjusted partitions' max size evicted 4591 numGC 26 limit 3.87 GB alloc 4.21 GB totalAlloc 8.11 GB
INFO  dynacache: adjusted partitions' max size evicted 4590 numGC 30 limit 3.87 GB alloc 5.25 GB totalAlloc 15.77 GB
INFO  dynacache: adjusted partitions' max size evicted 15491 numGC 32 limit 3.87 GB alloc 5.49 GB totalAlloc 23.85 GB
INFO  dynacache: adjusted partitions' max size evicted 968 numGC 42 limit 3.87 GB alloc 6.44 GB totalAlloc 45.13 GB
INFO  dynacache: adjusted partitions' max size evicted 8852 numGC 45 limit 3.87 GB alloc 4.82 GB totalAlloc 53.34 GB
INFO  dynacache: adjusted partitions' max size evicted 4231 numGC 51 limit 3.87 GB alloc 4.00 GB totalAlloc 65.35 GB
INFO  build:  step render substep pages site en outputFormat html duration 30.377162536s
INFO  build:  step render pages 14814 content 14812 duration 30.383772307s
INFO  build:  step postProcess duration 61.381µs

Template Metrics:

     cumulative       average       maximum      cache  percent  cached  total  
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
  3m41.225346449s   15.226467ms  993.451555ms          0        0       0  14529  _default/single.html
  20.179957417s      21.827µs   46.128798ms          0        0       0  924501  _internal/shortcodes/ref.html
   4.147459595s     279.987µs   52.032123ms         46        0       0  14813  partials/head.html
   2.240193645s     151.252µs   13.270117ms         69        0       0  14811  partials/breadcrumb.html
   718.479174ms    2.763381ms   33.216408ms          0        0       0    260  territories/term.html
   452.079683ms      30.521µs   10.703085ms         58        0       0  14812  partials/header.html
   437.666679ms   62.523811ms  112.894037ms          0        0       0      7  _default/list_packages.html
   377.274555ms  377.274555ms  377.274555ms          0        0       0      1  _internal/_default/sitemap.xml
   152.454036ms  152.454036ms  152.454036ms          0        0       0      1  territories/list.html
   142.350568ms       9.609µs   20.693309ms        100      100   14812  14813  partials/nav.html
   111.002201ms       7.493µs   37.261929ms        100      100   14812  14813  partials/head_custom.html
     84.47549ms       5.702µs    3.791423ms        100      100   14812  14813  partials/footer.html
    84.325865ms   12.046552ms   24.121207ms          0        0       0      7  _default/list_languages.html
    63.314398ms       20.43µs    3.084498ms          0        0       0   3099  shortcodes/resource.html
    17.870098ms    2.552871ms    9.580725ms          0        0       0      7  _default/release.html
    15.201086ms   15.201086ms   15.201086ms          0        0       0      1  index.html
     9.539395ms    9.539395ms    9.539395ms          0        0       0      1  404.html
       88.911µs      88.911µs      88.911µs        100        0       0      1  partials/footer_custom.html

INFO  build:  duration 44.729962603s
INFO  static: syncing static files to / duration 1m25.33311426s

                   |  EN    
-------------------+--------
  Pages            | 14814  
  Paginator pages  |     0  
  Non-page files   |     0  
  Static files     |  3205  
  Processed images |     0  
  Aliases          |     0  
  Cleaned          |     0  

Total in 85340 ms

real	1m26,559s
user	2m14,411s
sys	0m23,875s

What would be your suggested next step?
Looking at the single.html? internal links?

Hello,

Please do not completely disable RSS feeds if possible.

There are still enough users who would like to use such feeds. Like me, for example.