mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
hugolib: Buffer the render pages chan
This commit is contained in:
parent
032e6802d1
commit
950295516d
1 changed files with 3 additions and 3 deletions
|
@ -55,14 +55,14 @@ func (s siteRenderContext) renderSingletonPages() bool {
|
||||||
// TODO(bep np doc
|
// TODO(bep np doc
|
||||||
func (s *Site) renderPages(ctx *siteRenderContext) error {
|
func (s *Site) renderPages(ctx *siteRenderContext) error {
|
||||||
|
|
||||||
|
numWorkers := getGoMaxProcs() * 4
|
||||||
|
|
||||||
results := make(chan error)
|
results := make(chan error)
|
||||||
pages := make(chan *pageState)
|
pages := make(chan *pageState, numWorkers) // buffered for performance
|
||||||
errs := make(chan error)
|
errs := make(chan error)
|
||||||
|
|
||||||
go s.errorCollator(results, errs)
|
go s.errorCollator(results, errs)
|
||||||
|
|
||||||
numWorkers := getGoMaxProcs() * 4
|
|
||||||
|
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
|
|
||||||
for i := 0; i < numWorkers; i++ {
|
for i := 0; i < numWorkers; i++ {
|
||||||
|
|
Loading…
Reference in a new issue