diff --git a/package.json b/package.json index 23c8ddd..fbf602e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "image-workbench-web", "private": true, - "version": "3.26.169", + "version": "3.26.170", "description": "Browser-based node canvas image workbench", "scripts": { "build": "node scripts/build.js && node scripts/copy-plugins.js", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5811b15..d323765 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2014,7 +2014,7 @@ dependencies = [ [[package]] name = "image-workbench" -version = "3.26.167" +version = "3.26.169" dependencies = [ "arboard", "base64 0.22.1", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7b29d0b..b8f3095 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "image-workbench" -version = "3.26.169" +version = "3.26.170" description = "无限画布 · 生图工作台桌面版" authors = ["malongan"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index a9c5aaf..b193713 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "image-workbench", - "version": "3.26.169", + "version": "3.26.170", "identifier": "com.malongan.imageworkbench", "build": { "frontendDist": "../dist", diff --git a/src/ui-settings-tab-diag.js b/src/ui-settings-tab-diag.js index d70339f..21fdf92 100644 --- a/src/ui-settings-tab-diag.js +++ b/src/ui-settings-tab-diag.js @@ -20,7 +20,10 @@ function ensureDetail (ctx) { const now = Date.now() if (_detail.busy) return _detail.data - if (_detail.data && now - _detail.at < 8000) return _detail.data + // v3.26.170:8s → 60s。原来面板每 8 秒自动重扫(进程树 + 500+ 缩略图文件 + 插件目录), + // 每扫一次就 setDiagRev 重渲染一次 —— 面板开着时表现为持续 20% CPU、堆锯齿、磁盘 0.1MB/s。 + // 现在只在第一次打开时取一次,之后靠「刷新」按钮手动更新。 + if (_detail.data && now - _detail.at < 60000) return _detail.data _detail.busy = true Promise.resolve(typeof ctx.onDiagDetail === 'function' ? ctx.onDiagDetail() : null).then((d) => { _detail = { at: Date.now(), data: d, busy: false } @@ -115,7 +118,7 @@ el('div', { className: 'iwb-section-title' }, '运行诊断'), el('div', { className: 'iwb-hint' }, '用于排查「崩溃 / 内存占用高 / 界面出错」。记录只存在本机(localStorage),不含 Key、提示词和图片本体;进程/标签页意外结束后重开仍能看到崩溃前的记录。'), el('div', { className: 'iwb-row' }, - el('button', { className: 'iwb-btn iwb-btn-sm', onClick: () => { setDiagRev((v) => v + 1) } }, '刷新'), + el('button', { className: 'iwb-btn iwb-btn-sm', onClick: () => { _detail.at = 0; _detail.data = null; setDiagRev((v) => v + 1) } }, '刷新'), el('button', { className: 'iwb-btn iwb-btn-sm', title: '复制完整诊断 JSON(含崩溃记录与内存采样)', onClick: copyDiag }, '复制诊断 JSON'), // v3.26.117:内存回收。只清可重建的缓存(撤销历史/缩略图/图片字节缓存)并把非活动画板降回引用形态,不删用户数据。 el('button', { className: 'iwb-btn iwb-btn-sm', title: '立即回收内存:清撤销历史、缩略图缓存与图片字节缓存,非活动画板降回引用形态(不删任何画板/图片)', onClick: async () => { if (typeof reclaimMemory === 'function') await reclaimMemory() } }, '立即回收内存'),