-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request String + Data Non-Caching Templating Partial Function #11154
Comments
I have no idea what this issue is about, so you need to make it more clear with some examples. And please inline them and not link to some discussion somewhere on the internet. |
Basically, I'm requesting a partial function that is doing a Go template function against a given string, returning a string, without caching. Right now, I'm using hugo pipe to do the work as shown above. The problem is hugo pipe did unnecessary caching and somehow the caches are not released back to garbage collector even hitting the 10 minutes marker, behaving like a "memory leak" seen in C language. It doesn't matter how big your computer's RAM is, it will occupy all the RAM as garbage collector can't recover those unused memory. We're looking at 21%, then 46%, then 72%, then 100% of 16GB Memory, and then enter swap. I detected there is a memory related issue here (Go programming language can't possibly "memory leak"). However, as presented in the Discourse discussion, I was not approached by anyone about any usable diagnostic tools to further root cause the problem. I'm pretty sure it is Hugo Pipe because unfortunately, due to this issue, I was forced to stripped off quite a number of features (auto PWA caching, and etc). Hence, the entire theme is not using Reference function: https://github.com/ZORALab/Hestia/blob/experimental/hestiaHUGO/layouts/partials/hestiaSTRING/Sanitize Value wiseThis function itself can handle string rendering with Go templating which is very powerful that it can remove the need of using Markdown and hugo speicfic shortcode which behaves like partial. So, with this function, the theme developer can only focus on partial functions and create a Go compatible codes that are reusable elsewhere. I just pre-launch an outcome of my approach here: https://hestia.zoralab.com/ which proven that this vital function can indeed build good Hugo theme products. Use ExampleSomething like
Instead of:
|
Close this ticket since I'm no longer deploying Hugo. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Request
Basically to replace this:
Reason
Severity
The memory leak phenomeon can occupy all the memory space and even get into swap. The only way to use is to periodically kill hugo server and restart it.
The text was updated successfully, but these errors were encountered: