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:
@@ -128,11 +128,15 @@ func FlushQueue() {
|
||||
return
|
||||
}
|
||||
|
||||
if 16 < i && 0 == i%256 {
|
||||
if 16 < i && 0 == i%128 {
|
||||
runtime.GC()
|
||||
}
|
||||
}
|
||||
|
||||
if 128 < len(ops) {
|
||||
runtime.GC()
|
||||
}
|
||||
|
||||
elapsed := time.Now().Sub(start).Milliseconds()
|
||||
if 5000 < elapsed {
|
||||
logging.LogInfof("op tx [%dms]", elapsed)
|
||||
|
||||
Reference in New Issue
Block a user