🎨 If the data repo indexing time is greater than 12s, prompt user to purge the data repo https://github.com/siyuan-note/siyuan/issues/9613

This commit is contained in:
Daniel 2023-11-22 09:15:50 +08:00
parent 08a374825f
commit 52943932e9
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 7 additions and 7 deletions

View file

@ -1311,7 +1311,7 @@
"Children": [
{
"Type": "NodeText",
"Data": "If the data snapshot takes more than 7 seconds before data synchronization, you will be prompted to clean up the data warehouse. If you need to change the default time, you can use the following two methods."
"Data": "If the data snapshot takes more than 12 seconds before data synchronization, you will be prompted to clean up the data warehouse. If you need to change the default time, you can use the following two methods."
}
]
},

View file

@ -1287,7 +1287,7 @@
"Children": [
{
"Type": "NodeText",
"Data": "数据同步前进行数据快照如果耗时超过 7 秒会提示清理数据仓库,如果需要改动默认耗时,可通过如下两种方式"
"Data": "数据同步前进行数据快照如果耗时超过 12 秒会提示清理数据仓库,如果需要改动默认耗时,可通过如下两种方式"
}
]
},

View file

@ -1288,7 +1288,7 @@
"Children": [
{
"Type": "NodeText",
"Data": "資料同步前進行資料快照如果耗時超過 7 秒會提示清理資料倉儲,若需要變更預設耗時,可透過以下兩種方式"
"Data": "資料同步前進行資料快照如果耗時超過 12 秒會提示清理資料倉儲,若需要變更預設耗時,可透過以下兩種方式"
}
]
},

View file

@ -26,14 +26,14 @@ type Repo struct {
Key []byte `json:"key"` // AES 密钥
// 同步索引计时,单位毫秒,超过该时间则提示用户索引性能下降
// If the data repo indexing time is greater than 7s, prompt user to purge the data repo https://github.com/siyuan-note/siyuan/issues/9613
// If the data repo indexing time is greater than 12s, prompt user to purge the data repo https://github.com/siyuan-note/siyuan/issues/9613
// Supports configuring data sync index time-consuming prompts https://github.com/siyuan-note/siyuan/issues/9698
SyncIndexTiming int64 `json:"syncIndexTiming"`
}
func NewRepo() *Repo {
return &Repo{
SyncIndexTiming: 7 * 1000,
SyncIndexTiming: 12 * 1000,
}
}

View file

@ -331,8 +331,8 @@ func InitConf() {
Conf.Repo.SyncIndexTiming = int64(val)
}
}
if 7000 > Conf.Repo.SyncIndexTiming {
Conf.Repo.SyncIndexTiming = 7 * 1000
if 12000 > Conf.Repo.SyncIndexTiming {
Conf.Repo.SyncIndexTiming = 12 * 1000
}
if nil == Conf.Search {