Skip to content
Permalink
Browse files

hugolib: Buffer the render pages chan

  • Loading branch information...
bep committed Apr 4, 2019
1 parent 032e680 commit 950295516da882dcc51d83f70835dde230a0b4d6
Showing with 3 additions and 3 deletions.
  1. +3 −3 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++ {

0 comments on commit 9502955

Please sign in to comment.
You can’t perform that action at this time.