mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
⚡ 云端数据同步时降低交互阻塞时间 Fix https://github.com/siyuan-note/siyuan/issues/4984
This commit is contained in:
parent
1cdc80e1bd
commit
c88bd514d3
10 changed files with 63 additions and 91 deletions
|
|
@ -74,8 +74,9 @@ func ExportDataInFolder(exportFolder string) (err error) {
|
|||
util.PushEndlessProgress(Conf.Language(65))
|
||||
defer util.ClearPushProgress(100)
|
||||
|
||||
syncLock.Lock()
|
||||
defer syncLock.Unlock()
|
||||
WaitForWritingFiles()
|
||||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
|
||||
exportFolder = filepath.Join(exportFolder, util.CurrentTimeSecondsStr())
|
||||
err = exportData(exportFolder)
|
||||
|
|
@ -89,8 +90,9 @@ func ExportData() (zipPath string) {
|
|||
util.PushEndlessProgress(Conf.Language(65))
|
||||
defer util.ClearPushProgress(100)
|
||||
|
||||
syncLock.Lock()
|
||||
defer syncLock.Unlock()
|
||||
WaitForWritingFiles()
|
||||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
|
||||
baseFolderName := "data-" + util.CurrentTimeSecondsStr()
|
||||
exportFolder := filepath.Join(util.TempDir, "export", baseFolderName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue