diff --git a/README.md b/README.md index 384cca0..345ab17 100644 --- a/README.md +++ b/README.md @@ -59,14 +59,23 @@ Synchronization status is shown in statusbar. - Status - ⏚ī¸ Stopped - - 💤 LiveSync enabled. Waiting for changes. - - ⚡ī¸ Synchronization in progress. - - ⚠ An error occurred. -- ↑ Uploaded chunks and metadata -- ↓ Downloaded chunks and metadata -- âŗ Number of pending processes -- 🧩 Number of files waiting for their chunks. -If you have deleted or renamed files, please wait until âŗ icon disappears. + - 💤 LiveSync enabled. Waiting for changes + - ⚡ī¸ Synchronization in progress + - ⚠ An error occurred +- Statistical indicator + - ↑ Uploaded chunks and metadata + - ↓ Downloaded chunks and metadata +- Progress indicator + - đŸ“Ĩ Unprocessed transferred items + - 📄 Working database operation + - 💾 Working write storage processes + - âŗ Working read storage processes + - đŸ›Ģ Pending read storage processes + - ⚙ī¸ Working or pending storage processes of hidden files + - 🧩 Waiting chunks + - 🔌 Working Customisation items (Configuration, snippets and plug-ins) + +To prevent file and database corruption, please wait until all progress indicators have disappeared. Especially in case of if you have deleted or renamed files. ## Hints diff --git a/src/main.ts b/src/main.ts index 18d1aa9..e6586c5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1537,46 +1537,20 @@ Note: We can always able to read V1 format. It will be progressively converted. const queueCountLabel = reactive(() => { const dbCount = this.databaseQueueCount.value; const replicationCount = this.replicationResultCount.value; - const storageApplingCount = this.storageApplyingCount.value; + const storageApplyingCount = this.storageApplyingCount.value; const chunkCount = collectingChunks.value; const pluginScanCount = pluginScanningCount.value; const hiddenFilesCount = hiddenFilesEventCount.value + hiddenFilesProcessingCount.value; const labelReplication = replicationCount ? `đŸ“Ĩ ${replicationCount} ` : ""; const labelDBCount = dbCount ? `📄 ${dbCount} ` : ""; - const labelStorageCount = storageApplingCount ? `💾 ${storageApplingCount}` : ""; + const labelStorageCount = storageApplyingCount ? `💾 ${storageApplyingCount}` : ""; const labelChunkCount = chunkCount ? `🧩${chunkCount} ` : ""; const labelPluginScanCount = pluginScanCount ? `🔌${pluginScanCount} ` : ""; const labelHiddenFilesCount = hiddenFilesCount ? `⚙ī¸${hiddenFilesCount} ` : ""; return `${labelReplication}${labelDBCount}${labelStorageCount}${labelChunkCount}${labelPluginScanCount}${labelHiddenFilesCount}`; }) - const lockCountLabel = reactive(() => { - const lockStat = lockStats.value; - const processesCount = lockStat.count; - const processes = processesCount == 0 ? "" : ` âŗ${processesCount}`; - function getProcKind(proc: string) { - const p = proc.indexOf("-"); - if (p == -1) { - return proc; - } - return proc.substring(0, p); - } - const pendingTask = lockStat.pending.length - ? lockStat.pending.length < 10 ? ("\nPending: " + - Object.entries(lockStat.pending.reduce((p, c) => ({ ...p, [getProcKind(c)]: (p[getProcKind(c)] ?? 0) + 1 }), {} as { [key: string]: number })) - .map((e) => `${e[0]}${e[1] == 1 ? "" : `(${e[1]})`}`) - .join(", ") - ) : `\n Pending: ${lockStat.pending.length}` : ""; - - const runningTask = lockStat.running.length - ? lockStat.running.length < 10 ? ("\nRunning: " + - Object.entries(lockStat.running.reduce((p, c) => ({ ...p, [getProcKind(c)]: (p[getProcKind(c)] ?? 0) + 1 }), {} as { [key: string]: number })) - .map((e) => `${e[0]}${e[1] == 1 ? "" : `(${e[1]})`}`) - .join(", ") - ) : `\n Running: ${lockStat.running.length}` : ""; - return { processes, runningTask, pendingTask }; - }) const replicationStatLabel = reactive(() => { const e = this.replicationStat.value; const sent = e.sent; @@ -1615,20 +1589,18 @@ Note: We can always able to read V1 format. It will be progressively converted. }) const waitingLabel = reactive(() => { const e = this.pendingFileEventCount.value; - if (this.settings && this.settings.batchSave && !this.settings.liveSync) { - if (e != 0) { - return ` đŸ›Ģ${e}`; - } - } - return ""; + const proc = this.fileEventQueue.processingEntities; + const pend = e - proc; + const labelProc = proc != 0 ? `âŗ${proc} ` : ""; + const labelPend = pend != 0 ? ` đŸ›Ģ${pend}` : ""; + return `${labelProc}${labelPend}`; }) const statusLineLabel = reactive(() => { const { w, sent, pushLast, arrived, pullLast } = replicationStatLabel.value; - const { processes, pendingTask, runningTask } = lockCountLabel.value; const queued = queueCountLabel.value; const waiting = waitingLabel.value; return { - message: `Sync: ${w} ↑${sent}${pushLast} ↓${arrived}${pullLast}${waiting}${processes} ${queued}${pendingTask}${runningTask}`, + message: `Sync: ${w} ↑${sent}${pushLast} ↓${arrived}${pullLast}${waiting} ${queued}`, }; }) const statusBarLabels = reactive(() => { diff --git a/updates.md b/updates.md index 6f33166..06d93f0 100644 --- a/updates.md +++ b/updates.md @@ -12,11 +12,22 @@ Note: we got a very performance improvement. - 0.22.0 - Refined: - Task scheduling logics has been rewritten. - - Possibly many bugs and fragile behaviour has been fixed + - Screen updates are also now efficient. + - Possibly many bugs and fragile behaviour has been fixed. + - Status updates and logging have been thinned out to display. - Fixed: - Remote-chunk-fetching now works with keeping request intervals - New feature: - We can show only the icons in the editor. + - Progress indicators have been more meaningful: + - đŸ“Ĩ Unprocessed transferred items + - 📄 Working database operation + - 💾 Working write storage processes + - âŗ Working read storage processes + - đŸ›Ģ Pending read storage processes + - ⚙ī¸ Working or pending storage processes of hidden files + - 🧩 Waiting chunks + - 🔌 Working Customisation items (Configuration, snippets and plug-ins) ... To continue on to `updates_old.md`. \ No newline at end of file