mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user