feat: v3.26.157 诊断页 Windows 分进程内存拆解(工作集+私有提交);取消 30% LOD 档只留 15% 占位
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 39s

This commit is contained in:
qiqi committed 2026-12-01 10:13:08 +08:00
1 parent e9581e52a6
commit 2f9590bcc7
8 files changed
+103 -11

No files matched your search

+3 -1
View File
@@ -301,8 +301,10 @@
if (!node || node.type === 'relay') return ''
const s = Number(viewport && viewport.scale)
if (!Number.isFinite(s) || s <= 0) return ''
// v3.26.157:取消 30% 那档 lite —— 它在阈值附近来回切换,视觉上就是「画面常闪」。
// 现在只剩一档:<15% 切 plain,其余一律渲染完整节点体。
if (s < LOD_PLAIN_SCALE) return 'plain'
return lodLowOf(viewport, node, nodeWidth) ? 'lite' : ''
return ''
}
// ── 按钮缩放(v3.24.83)────────────────────────────────────────────────
+8 -4
View File
@@ -140,13 +140,17 @@
if (!d) return el('div', { className: 'iwb-hint' }, '正在读取分进程内存…')
const bd = d.breakdown || {}
const procs = Array.isArray(bd.procs) ? bd.procs : []
const wsKind = bd.kind === 'workingset'
const wvMB = procs.filter((p) => p && p.role === 'WebView2').reduce((n, p) => n + (Number(p.footprintMB) || 0), 0)
return el('div', null,
el('div', { className: 'iwb-section-sub' }, '内存拆解(分进程 footprint,合计 ' + (bd.totalMB || 0) + 'MB)'),
el('div', { className: 'iwb-section-sub' }, '内存拆解(分进程' + (wsKind ? '工作集' : 'footprint') + ',合计 ' + (bd.totalMB || 0) + 'MB' + (wvMB ? (' · WebView2 ' + wvMB + 'MB') : '') + ')'),
procs.length ? el('div', { className: 'iwb-diag-list' }, procs.map((p, i) => el('div', { key: 'mp' + i, className: 'iwb-diag-item' },
el('div', { className: 'iwb-diag-head' }, p.role + ' · ' + p.footprintMB + 'MB'),
el('div', { className: 'iwb-diag-head' }, p.role + (p.pid ? (' #' + p.pid) : '') + ' · ' + p.footprintMB + 'MB' + (p.privMB != null ? ('(私有 ' + p.privMB + 'MB)') : '')),
(p.top && p.top.length) ? el('div', { className: 'iwb-diag-extra' }, p.top.slice(0, 3).map((c) => c.cat + ' ' + c.dirtyMB + 'MB').join(' · ')) : null,
))) : el('div', { className: 'iwb-hint' }, '仅桌面端可读取(需 footprint 工具)'),
el('div', { className: 'iwb-hint' }, 'footprint 与活动监视器「内存」列同源;一个 WebKit 应用通常有 宿主 + WebContent + GPU + Networking 四个进程。'),
))) : el('div', { className: 'iwb-hint' }, '仅桌面端可读取'),
el('div', { className: 'iwb-hint' }, wsKind
? '工作集与任务管理器「内存」列同源,「私有」是进程实际提交的字节;宿主 + WebView2 各子进程相加即整包占用。'
: 'footprint 与活动监视器「内存」列同源;一个 WebKit 应用通常有 宿主 + WebContent + GPU + Networking 四个进程。'),
)
})(),
(function renderLedger () {