mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
373f6b16e2
commit
430bf34dfb
1 changed files with 5 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"path"
|
"path"
|
||||||
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -125,6 +126,10 @@ func FlushQueue() {
|
||||||
logging.LogErrorf("commit tx failed: %s", err)
|
logging.LogErrorf("commit tx failed: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if 16 < i && 0 == i%256 {
|
||||||
|
runtime.GC()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elapsed := time.Now().Sub(start).Milliseconds()
|
elapsed := time.Now().Sub(start).Milliseconds()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue