String processing with Go template capability. The function is too primitive for caching every string the module processes (and noticeable memory consumption).
The random number + URL fields are required due to uncontrollable caching not able to update certain components in the module.
Problem trying to solve:
High memory consumption (about 240MB, 2% of 12GB RAM).
You cannot instruct Hugo Pipe not to cache, which has proven to be a problem when doing transform.Unmarshal on large amount of big JSON files. I have not seen your particular problem reported before, and I wouldn’t call 240MB of 12GB “high memory consumption”.
That said, I have a release planned in the near future (it’s called the “million pages” release in the road map) which introduces a LRU cache for most of Hugo’s caching – which gets dynamically resized in low memory situations.
Yeap. I haven’t report anything yet. You got a very helpful and knowledgeable communities here so wondering did others face the same problem.
I see. It’s quite scary because the total size (as in include those Blink and Gecko engine browsers) for testing, I barely can move around in my 12GB RAM 8-years old laptop haha.
Partly I’m to be blamed because I managed to turn Hugo into a web UI component compiler rather than just compiling page contents alone (as in compile compliant favicons, PWA, openGraph, sitemaps, robots, CSS, JS, hosting WASM, and etc) without any external dependencies. Can’t spoil it yet… coming soon. Currently porting the documentations.
Noted. No hush. Status quo can still work. I’m just looking for ways to further optimise the module.