output: Speed up layout calculations

```
BenchmarkLayout-4     4883          497           -89.82%

benchmark             old allocs     new allocs     delta
BenchmarkLayout-4     18             1              -94.44%

benchmark             old bytes     new bytes     delta
BenchmarkLayout-4     1624          32            -98.03%
```
This commit is contained in:
Bjørn Erik Pedersen
2017-03-18 16:46:10 +01:00
parent df95383914
commit 6178238a0b
4 changed files with 42 additions and 4 deletions

View File

@@ -1656,7 +1656,7 @@ func (s *Site) kindFromSections(sections []string) string {
}
func (s *Site) layouts(p *PageOutput) []string {
return s.layoutHandler.For(p.createLayoutDescriptor(), "", p.outputFormat)
return s.layoutHandler.For(p.layoutDescriptor, "", p.outputFormat)
}
func (s *Site) preparePages() error {