diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-12-16 18:56:58 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-12-16 19:44:33 +0100 |
commit | db4b7a5c6742c75f9cd9627d3b054d3a72802ec8 (patch) | |
tree | e83c9d409698d159ddb62a512562d7056331714b /hugolib/config.go | |
parent | 25114986086e5877a0b4108d8cf5e4e95f377241 (diff) |
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%
```
Diffstat (limited to 'hugolib/config.go')
-rw-r--r-- | hugolib/config.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/config.go b/hugolib/config.go index da84ab8b2..62098aeea 100644 --- a/hugolib/config.go +++ b/hugolib/config.go @@ -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", "") |