We use memory when rebuilding, yes. How much depends on a number of factors, e.g. what you change. I think you need to watch this “memory footprint” over time to see the real behaviour. It should go down when Go’s garbage collector kicks in.
What you can try is:
“hugo server --poll 5s” (or something) and see if that changes things.
Next:
Try “HUGO_MEMORYLIMIT=1 hugo server --poll 5s --logLevel info”
Memorylimit 1GB should force a more aggressive cache eviction strategy and you should see some related log messages on cache resizing.
I have this code in ~/.bashrc. I will monitor with the poll command and see. Though the increase is gradual (hours) rather than at once. Yesterday, I was making a partial for single page, trying different iterations.
# Cap Hugo's internal page/template cache to 3GB, preventing it from eating system RAM
hugo() {
HUGO_MEMORYLIMIT=3 command hugo "$@"
}
What exactly do you mean by RAM in the above statement? There’s a big difference between total allocated memory (where this would be normal) and current allocated memory for a given process (which may or may not be normal; the Go garbage collector lives it’s one live and HUGO_MEMORYLIMIT is just a threshold where Hugo will make objects available for GC). But this is impossible for me to reason about just looking at your numbers.