🎨 OCR no longer blocks document loading https://github.com/siyuan-note/siyuan/issues/9230

This commit is contained in:
Daniel 2023-12-07 20:40:16 +08:00
parent b31765d0ab
commit 283917a9a8
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 123 additions and 11 deletions

View file

@ -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
}
}