Skip to content

Commit

Permalink
hugolib: Buffer the render pages chan
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Apr 4, 2019
1 parent 032e680 commit 9502955
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hugolib/site_render.go
Expand Up @@ -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++ {
Expand Down

0 comments on commit 9502955

Please sign in to comment.