Extremely slow dev server

But there are some very unusual stuff going on that is impossible for us to debug further without access to the full source code.

I’ll do my best to replicate in a separate repo.

What puzzles me is that I’m getting pretty normal build times with the same set up in versions <= 0.140.1. I don’t know Go well (so this may be a red herring), but I do see that in the diff from 0.140.1 to 0.140.2 there are some changes to resource cacheing. Could any of those changes be related?

it’s worth testing if remove any watch/mount of the hugo_stats.json file makes the server start normally.

I’ve tried removing that from the config, but the build times for hugo server remain quite high.

Again, I don’t know what the original project is configured

Not sure how useful this is, but here’s the config, minus languages.toml (contains 23 languages) and menus.toml:

baseURL = "http://localhost:1313"
languageCode = "en-us"
title = "My Site DEV"
enableRobotsTXT = true
relativeURLs = true
buildFuture = true
rssLimit = 10

[pagination]
  pagerSize = 20

[taxonomies]
  'ai/category' = 'ai/category'
  'ads/learn/category' = 'ads/learn/category'
  'learn/category' = 'learn/category'
  'research/topic' = 'research/topic'
  'web3/category' = 'web3/category'
  category = "category"
  author = "author"

[frontmatter]
  lastmod = ["lastmod"]

[related]
  includeNewer = true
  toLower = true
  [[related.indices]]
    name = "category"
    weight = 1
  [[related.indices]]
    name = "ai/category"
    weight = 1
  [[related.indices]]
    name = "ads/learn/category"
    weight = 1
  [[related.indices]]
    name = "learn/category"
    weight = 1
  [[related.indices]]
    name = "research/topic"
    weight = 1
  [[related.indices]]
    name = "web3/category"
    weight = 1

[module]
  [[module.mounts]]
    source = 'static'
    target = 'static'
    excludeFiles = '/**/.keep'
  [[module.mounts]]
    source = "assets"
    target = "assets"
  [[module.mounts]]
    source = 'data'
    target = 'data'
  [[module.mounts]]
    source = 'i18n'
    target = 'data'

[build]
  [[build.cachebusters]]
    source = "(?:(postcss|tailwind)\\.config\\.js|content/.*\\.(?:css|scss))"
    target = "css"
  [[build.cachebusters]]
    source = "assets/.*\\.(js|ts|jsx|tsx)"
    target = "js"
  [[build.cachebusters]]
    source = "assets/.*\\.(.*)$"
    target = "$1"

[security]
  [security.exec]
    allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^npx$', '^postcss$']

# Default term page weights to 1000
[[cascade]]
  weight = 1000
  [cascade._target]
    kind = "{term}"

# Disable taxonomy & term pages by default for languages which
# don't have content with taxonomies associated.
[[cascade]]
  render = false
  headless = true
  [cascade._build]
    list = false
    render = false
  [cascade._target]
    lang = "{da,it,sv,fil,hi,id,nl,pl,ru,vi}"
    kind = "{taxonomy,term}"

# The _content-components folder is never meant to be rendered,
# therefore it is marked as both headless and not to render
[[cascade]]
  headless = true
  render = false
  [cascade._build]
    render = "never"
  [cascade._target]
    path = "/_content-components**"

# Params for microsite category pages
[[cascade]]
  sectionTaxonomy = "ai/category"
  type = "microsite"
  bodyClass = "ai-page"
  heroClass = "bg-white pt-0"
  theme = "light"
  [cascade._target]
    path = "/ai/category**"

[[cascade]]
  sectionTaxonomy = "ads/learn/category"
  type = "microsite"
  bodyClass = "ads/learn-page"
  heroClass = "bg-white pt-0"
  theme = "extra-light"
  [cascade._target]
    path = "/ads/learn/category**"

[[cascade]]
  sectionTaxonomy = "learn/category"
  type = "microsite"
  bodyClass = "learn-page taxonomy-page"
  heroClass = "bg-white pt-0"
  theme = "light"
  [cascade._target]
    path = "/learn/category**"

[[cascade]]
  sectionTaxonomy = "web3/category"
  type = "microsite"
  bodyClass = "web3-page taxonomy-page"
  heroClass = "bg-white pt-0"
  theme = "light"
  [cascade._target]
    path = "/web3/category**"

[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true
      [markup.goldmark.parser]
        [markup.goldmark.parser.attribute]
            block = true
  [markup.highlight]
    noClasses = false
    tabWidth = 4
  [markup.tableOfContents]
    endLevel = 2

[deployment]
  order = [".(css|js)$"]

  [[deployment.targets]]
    name = "staging"
    url = "s3://placeholder"