浏览代码

Increase the default number of UAST workers

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
Vadim Markovtsev 7 年之前
父节点
当前提交
fa1869a221
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      changes_xpather.go
  2. 1 1
      uast.go

+ 1 - 1
changes_xpather.go

@@ -3,12 +3,12 @@ package hercules
 import (
 	"log"
 
+	"bytes"
 	"github.com/minio/highwayhash"
 	"gopkg.in/bblfsh/client-go.v2/tools"
 	"gopkg.in/bblfsh/sdk.v1/uast"
 	"gopkg.in/src-d/go-git.v4/plumbing"
 	"io"
-	"bytes"
 )
 
 // ChangesXPather extracts changed UAST nodes from files changed in the current commit.

+ 1 - 1
uast.go

@@ -136,7 +136,7 @@ func (exr *UASTExtractor) ListConfigurationOptions() []ConfigurationOption {
 		Description: "Number of goroutines to extract UASTs.",
 		Flag:        "bblfsh-pool-size",
 		Type:        IntConfigurationOption,
-		Default:     runtime.NumCPU()}, {
+		Default:     runtime.NumCPU() * 2}, {
 		Name:        ConfigUASTFailOnErrors,
 		Description: "Panic if there is a UAST extraction error.",
 		Flag:        "bblfsh-fail-on-error",