aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-07-17 12:51:49 +0200
committerBjørn Erik Pedersen <[email protected]>2024-07-17 12:51:49 +0200
commit4d8bfa7f1c21a4b7ece26acdcba3f2e38e54d923 (patch)
tree80070a3432f325b825932247d60186f943bead6e /tpl
parentf0ed91caba9ab962593479e745a0df1a5518c4bf (diff)
downloadhugo-4d8bfa7f1c21a4b7ece26acdcba3f2e38e54d923.tar.gz
hugo-4d8bfa7f1c21a4b7ece26acdcba3f2e38e54d923.zip
tpl: Use xxHash instead of MD5 to hash the deferred templates
Motivation is performance. These templates are typically very small, so the win is minor, I guess.
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/template_ast_transformers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/tplimpl/template_ast_transformers.go b/tpl/tplimpl/template_ast_transformers.go
index 57730f82e..9eee64235 100644
--- a/tpl/tplimpl/template_ast_transformers.go
+++ b/tpl/tplimpl/template_ast_transformers.go
@@ -254,7 +254,7 @@ func (c *templateContext) handleDefer(withNode *parse.WithNode) {
c.err = errors.New("resources.PostProcess cannot be used in a deferred template")
return
}
- innerHash := helpers.MD5String(s)
+ innerHash := helpers.XxHashString(s)
deferredID := tpl.HugoDeferredTemplatePrefix + innerHash
c.deferNodes[deferredID] = inner