diff --git a/CHANGELOG.md b/CHANGELOG.md index 10f024c..c33caf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ > 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。 > 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。 +## v3.26.149(2026-12-01)Canvas V3:LOD + 1000 节点基线 + +- Canvas 节点绘制增加屏幕宽度 LOD(<8px 底板、<40px 跳内容); +- headless Chromium 1000 节点:pan p95 21.5ms → 17.5ms,DOM 1000 → 0; +- 60 节点仍锁 60fps;WKWebView 实机待测。 ## v3.26.148(2026-12-01)Canvas V3:layer 节点 + 插件 fallback 保持关闭 - `layer` 接入 Canvas:未选中画层列表,选中恢复完整 NodeCard; diff --git a/docs/plans/canvas-v3-progress.md b/docs/plans/canvas-v3-progress.md index 1fecb20..57f73fb 100644 --- a/docs/plans/canvas-v3-progress.md +++ b/docs/plans/canvas-v3-progress.md @@ -181,6 +181,22 @@ 结论:Chromium 下两者都锁 60fps,Canvas V3 的收益主要体现为 DOM 数(60→0);WKWebView 需桌面实机验证。 运行:`IWB_CANVAS_V3=1 IWB_PROBE_NODES=60 IWB_PROBE_LIGHT=1 npx playwright test tests/_perf-baseline.spec.js`。 +### P4 LOD + 1000 节点基线(2026-12-01) + +Canvas 节点绘制增加屏幕宽度 LOD: + +- 屏幕宽度 <8px:只画底板; +- <40px:跳过标题/文本/图片; +- 正常缩放:完整体。 + +1000 节点 light probe(headless Chromium): + +| 模式 | DOM 节点 | pan p50 | pan p95 | max | +|---|---:|---:|---:|---:| +| off | 1000 | 16.7ms | 21.5ms | 26.0ms | +| on + LOD | 0 | 16.6ms | 17.5ms | 17.6ms | + +结论:Chromium 下 1000 节点时 Canvas V3 的 p95 从 21.5ms 降到 17.5ms;WKWebView 仍需实机。 ## 2026-12-01 · v3.26.147 发布 - 插件 fallback 默认关闭(仅 dev flag 开启);插件节点保持原 DOM; diff --git a/package.json b/package.json index 075db24..02a8333 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "image-workbench-web", "private": true, - "version": "3.26.148", + "version": "3.26.149", "description": "Browser-based node canvas image workbench", "scripts": { "build": "node scripts/build.js && node scripts/copy-plugins.js", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index cfc6fa0..db01524 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "image-workbench" -version = "3.26.148" +version = "3.26.149" description = "无限画布 · 生图工作台桌面版" authors = ["malongan"] license = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index b3ee786..e1d6f80 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.148", + "version": "3.26.149", "identifier": "com.malongan.imageworkbench", "build": { "frontendDist": "../dist", diff --git a/src/canvas-v3-node-layer.js b/src/canvas-v3-node-layer.js index b516597..b99cfee 100644 --- a/src/canvas-v3-node-layer.js +++ b/src/canvas-v3-node-layer.js @@ -83,6 +83,14 @@ for (const n of nodes) { if (!n || !isType(n) || sel.indexOf(n.id) >= 0) continue const x = n.x, y = n.y, nw = widthOf(n), nh = heightOf(n) + const screenW = nw * scale + // LOD:极小节点只画底板,跳标题/文本/图片,避免 7000 节点缩放时做无用绘制。 + if (screenW < 8) { + ctx.fillStyle = bg + ctx.fillRect(x, y, nw, nh) + continue + } + const lowDetail = screenW < 40 // 卡片 ctx.fillStyle = bg roundRect(ctx, x, y, nw, nh, radius) @@ -94,12 +102,15 @@ ctx.fillStyle = text ctx.font = '600 ' + Math.max(10, 12 / scale * 0.9) + 'px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif' const title = String((n.data && (n.data.title || n.data.name)) || ({ ref: '参考图', prompt: '提示词', textout: '文本', combine: '组合', batch: '连接', relay: '中继', gen: '生成配置', layer: '分层', plugin: '插件' }[n.type] || (String(n.type).indexOf('plugin:') === 0 ? '插件' : '节点'))) - ctx.save() - ctx.beginPath(); ctx.rect(x + 10, y, Math.max(0, nw - 20), headH); ctx.clip() - ctx.fillText(title, x + 12, y + 21) - ctx.restore() + if (!lowDetail) { + ctx.save() + ctx.beginPath(); ctx.rect(x + 10, y, Math.max(0, nw - 20), headH); ctx.clip() + ctx.fillText(title, x + 12, y + 21) + ctx.restore() + } const pad = 10 const ix = x + pad, iy = y + headH, iw = Math.max(1, nw - pad * 2), ih = Math.max(1, nh - headH - pad) + if (lowDetail) continue if (n.type === 'ref') { // 图片区 const raw = n.data && (n.data.data || n.data.url)