mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"path"
|
||||
"runtime/debug"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -121,7 +122,7 @@ func FlushQueue() {
|
||||
return
|
||||
}
|
||||
|
||||
if 0 < i && 0 == execOps%64 {
|
||||
if 0 < i && 0 == execOps%128 {
|
||||
if err = commitTx(tx); nil != err {
|
||||
logging.LogErrorf("commit tx failed: %s", err)
|
||||
return
|
||||
@@ -132,6 +133,7 @@ func FlushQueue() {
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
debug.FreeOSMemory()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user