mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 22:52:34 +01:00
🎨 OCR no longer blocks document loading https://github.com/siyuan-note/siyuan/issues/9230
This commit is contained in:
parent
b31765d0ab
commit
283917a9a8
8 changed files with 123 additions and 11 deletions
|
|
@ -21,7 +21,7 @@ func OCRAssetsJob() {
|
|||
return
|
||||
}
|
||||
|
||||
task.AppendTaskWithTimeout(task.OCRImage, 7*time.Second, autoOCRAssets)
|
||||
task.AppendTaskWithTimeout(task.OCRImage, 30*time.Second, autoOCRAssets)
|
||||
}
|
||||
|
||||
func autoOCRAssets() {
|
||||
|
|
@ -40,7 +40,7 @@ func autoOCRAssets() {
|
|||
if "" != text {
|
||||
util.AssetsTextsChanged = true
|
||||
}
|
||||
if 4 <= i { // 一次任务中最多处理 4 张图片,防止卡顿
|
||||
if 7 <= i { // 一次任务中最多处理 7 张图片,防止长时间占用系统资源
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue