summaryrefslogtreecommitdiffstats
path: root/hugolib/page_output.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-07 09:55:17 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commit03122e51fa41d0a289054eedc2d6fffd7f9f2e0b (patch)
treed11beb8f032f2f72936e4f0ed6fbc9c9f68cdd85 /hugolib/page_output.go
parente5200ddaa4d44934cec2ffbbb02a51ff69488c14 (diff)
hugolib: Revert to using Page as the render chan type
Changing it to PageOutput was a mistake. You may think that the increased parallelism should be a good thing. But not so much with the increased lock contention and more complex concurrency model.
Diffstat (limited to 'hugolib/page_output.go')
-rw-r--r--hugolib/page_output.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/page_output.go b/hugolib/page_output.go
index 79b7ead9a..50605bddf 100644
--- a/hugolib/page_output.go
+++ b/hugolib/page_output.go
@@ -25,9 +25,11 @@ type PageOutput struct {
outputType output.Type
}
-func newPageOutput(p *Page, outputType output.Type) *PageOutput {
+func newPageOutput(p *Page, createCopy bool, outputType output.Type) *PageOutput {
// TODO(bep) output avoid copy of first?
- p = p.copy()
+ if createCopy {
+ p = p.copy()
+ }
return &PageOutput{Page: p, outputType: outputType}
}