mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🔥 Revert Improve block loading performance on Windows/Linux/macOS amd64 arch Fix https://github.com/siyuan-note/siyuan/issues/9131
This commit is contained in:
parent
1373d3d10b
commit
7cd20f9999
3 changed files with 1 additions and 47 deletions
|
|
@ -14,8 +14,6 @@
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//go:build !amd64
|
|
||||||
|
|
||||||
package filesys
|
package filesys
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
@ -23,10 +21,5 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func unmarshalJSON(data []byte, v interface{}) error {
|
func unmarshalJSON(data []byte, v interface{}) error {
|
||||||
//now := time.Now()
|
|
||||||
//defer func() {
|
|
||||||
// elapsed := time.Since(now)
|
|
||||||
// logging.LogInfof("[go-json] unmarshalJSON took %s", elapsed)
|
|
||||||
//}()
|
|
||||||
return json.Unmarshal(data, v)
|
return json.Unmarshal(data, v)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
// SiYuan - Refactor your thinking
|
|
||||||
// Copyright (c) 2020-present, b3log.org
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
package filesys
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/bytedance/sonic"
|
|
||||||
"github.com/goccy/go-json"
|
|
||||||
"github.com/siyuan-note/logging"
|
|
||||||
)
|
|
||||||
|
|
||||||
func unmarshalJSON(data []byte, v interface{}) (err error) {
|
|
||||||
//now := time.Now()
|
|
||||||
defer func() {
|
|
||||||
if e := recover(); nil != e {
|
|
||||||
logging.LogWarnf("[sonic] unmarshalJSON failed: %s", e)
|
|
||||||
err = json.Unmarshal(data, v)
|
|
||||||
} /*else {
|
|
||||||
elapsed := time.Since(now)
|
|
||||||
logging.LogInfof("[sonic] unmarshalJSON took %s", elapsed)
|
|
||||||
}*/
|
|
||||||
}()
|
|
||||||
|
|
||||||
err = sonic.Unmarshal(data, v)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
@ -17,7 +17,6 @@ require (
|
||||||
github.com/PuerkitoBio/goquery v1.8.1
|
github.com/PuerkitoBio/goquery v1.8.1
|
||||||
github.com/Xuanwo/go-locale v1.1.0
|
github.com/Xuanwo/go-locale v1.1.0
|
||||||
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
|
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
|
||||||
github.com/bytedance/sonic v1.10.0
|
|
||||||
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be
|
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be
|
||||||
github.com/denisbrodbeck/machineid v1.0.1
|
github.com/denisbrodbeck/machineid v1.0.1
|
||||||
github.com/dgraph-io/ristretto v0.1.1
|
github.com/dgraph-io/ristretto v0.1.1
|
||||||
|
|
@ -78,6 +77,7 @@ require (
|
||||||
github.com/andybalholm/cascadia v1.3.2 // indirect
|
github.com/andybalholm/cascadia v1.3.2 // indirect
|
||||||
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef // indirect
|
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef // indirect
|
||||||
github.com/aws/aws-sdk-go v1.45.2 // indirect
|
github.com/aws/aws-sdk-go v1.45.2 // indirect
|
||||||
|
github.com/bytedance/sonic v1.10.0 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
||||||
github.com/chenzhuoyu/iasm v0.9.0 // indirect
|
github.com/chenzhuoyu/iasm v0.9.0 // indirect
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue