diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-01-11 17:32:58 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-01-12 07:45:53 +0100 |
commit | cdcd15b6c2abbb76fd95fbbf90365c56e82f46aa (patch) | |
tree | 511b578d75d51ee3154028468aa1912f3c4c61b1 /docs/content/en | |
parent | 25d645f47ae0a32470d303c9478c9e0b2fff0f0e (diff) |
Only create LazyContentProvider for the non-rendering Site
Which saves a fair amound of allocations:
```
gobench --package ./hugolib --bench "SiteNew/Regular_D" --base master
```
Before:
```
name old time/op new time/op delta
SiteNew/Regular_Deep_content_tree-10 40.7ms ± 3% 41.2ms ± 1% ~ (p=0.343 n=4+4)
name old alloc/op new alloc/op delta
SiteNew/Regular_Deep_content_tree-10 27.7MB ± 0% 28.8MB ± 0% +3.76% (p=0.029 n=4+4)
name old allocs/op new allocs/op delta
SiteNew/Regular_Deep_content_tree-10 304k ± 0% 329k ± 0% +8.07% (p=0.029 n=4+4)
```
After:
```
name old time/op new time/op delta
SiteNew/Regular_Deep_content_tree-10 34.2ms ± 1% 34.7ms ± 1% ~ (p=0.114 n=4+4)
name old alloc/op new alloc/op delta
SiteNew/Regular_Deep_content_tree-10 27.7MB ± 0% 28.1MB ± 0% +1.38% (p=0.029 n=4+4)
name old allocs/op new allocs/op delta
SiteNew/Regular_Deep_content_tree-10 304k ± 0% 314k ± 0% +3.03% (p=0.029 n=4+4)
```
Updates #8919
Diffstat (limited to 'docs/content/en')
0 files changed, 0 insertions, 0 deletions