mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
Reuse the BlackFriday instance when possible
This is in heavy use in rendering, so this makes a difference: ```bash benchmark old ns/op new ns/op delta BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4 124551144 107743429 -13.49% benchmark old allocs new allocs delta BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4 528684 435118 -17.70% benchmark old bytes new bytes delta BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4 53306848 45147832 -15.31% ```
This commit is contained in:
@@ -210,7 +210,7 @@ func loadDefaultSettingsFor(v *viper.Viper) error {
|
||||
v.SetDefault("paginate", 10)
|
||||
v.SetDefault("paginatePath", "page")
|
||||
v.SetDefault("summaryLength", 70)
|
||||
v.SetDefault("blackfriday", c.NewBlackfriday())
|
||||
v.SetDefault("blackfriday", c.BlackFriday)
|
||||
v.SetDefault("rSSUri", "index.xml")
|
||||
v.SetDefault("rssLimit", -1)
|
||||
v.SetDefault("sectionPagesMenu", "")
|
||||
|
Reference in New Issue
Block a user