aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_render.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-04-04 16:50:10 +0200
committerBjørn Erik Pedersen <[email protected]>2019-04-04 16:50:10 +0200
commit950295516da882dcc51d83f70835dde230a0b4d6 (patch)
treeabc4baa520cad606915604d6f7c7c2836efef5d3 /hugolib/site_render.go
parent032e6802d1f34cc41f6d1275fdd2deab8bbe5480 (diff)
downloadhugo-950295516da882dcc51d83f70835dde230a0b4d6.tar.gz
hugo-950295516da882dcc51d83f70835dde230a0b4d6.zip
hugolib: Buffer the render pages chan
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r--hugolib/site_render.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
index cf3755b92..f3df09f09 100644
--- a/hugolib/site_render.go
+++ b/hugolib/site_render.go
@@ -55,14 +55,14 @@ func (s siteRenderContext) renderSingletonPages() bool {
// TODO(bep np doc
func (s *Site) renderPages(ctx *siteRenderContext) error {
+ numWorkers := getGoMaxProcs() * 4
+
results := make(chan error)
- pages := make(chan *pageState)
+ pages := make(chan *pageState, numWorkers) // buffered for performance
errs := make(chan error)
go s.errorCollator(results, errs)
- numWorkers := getGoMaxProcs() * 4
-
wg := &sync.WaitGroup{}
for i := 0; i < numWorkers; i++ {