提升引擎性能-替换json标准库为iterator/go库

This commit is contained in:
boyce
2020-07-16 11:22:37 +08:00
parent 604ee51aab
commit 4048d2f2b7
3 changed files with 9 additions and 3 deletions

View File

@@ -1,14 +1,16 @@
package cluster
import (
"encoding/json"
"fmt"
"github.com/duanhf2012/origin/log"
"github.com/duanhf2012/origin/rpc"
jsoniter "github.com/json-iterator/go"
"io/ioutil"
"strings"
)
var json = jsoniter.ConfigCompatibleWithStandardLibrary
func (slf *Cluster) ReadClusterConfig(filepath string) (*SubNet,error) {
c := &SubNet{}
d, err := ioutil.ReadFile(filepath)