Skip to content

Commit c834d75

Browse files
committed
feat(startup): finalize v1.1 startup optimization and docs sync for v1.7.0
1 parent 1e6d8f9 commit c834d75

9 files changed

Lines changed: 333 additions & 60 deletions

File tree

docs/diataxis/en/explanation/startup-node-update-acceleration-plan.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,32 @@ npm run perf:startup:matrix -- --root tmp/startup-logs --single-platform-label w
237237
- `TFS`: `2299.40ms -> 1679.50ms`, improvement `26.96%`
238238
- Final report:
239239
- `tmp/startup-logs/report-planb-final-windows.md`
240+
241+
## 17) v1.1 Optimization + Risk Guardrail Hardening (March 31, 2026)
242+
243+
- Runtime optimization additions:
244+
- Worker delta now supports low-alpha adaptive policy:
245+
- `lowAlphaDeltaEpsilonMultiplier` (raises epsilon near stable phase to reduce payload size)
246+
- `lowAlphaFullSyncEveryTicks` (relaxes periodic full-sync frequency near stable phase)
247+
- Worker tick payload now includes node index fast-path (`nodes[].i`) to reduce main-thread id-map lookup overhead.
248+
- Main thread startup tick application is frame-coalesced:
249+
- multiple tick messages in one frame are merged,
250+
- position updates apply once per frame,
251+
- redundant empty-delta paints are skipped.
252+
- Risk mitigation additions:
253+
- Warm snapshot apply now has strict runtime validation:
254+
- fingerprint consistency check,
255+
- snapshot age guard (`STARTUP_LAYOUT_SNAPSHOT_MAX_AGE_MS`),
256+
- node/edge count consistency check,
257+
- position coverage floor (`>=90%`) to avoid partial snapshot corruption.
258+
- Invalid snapshots are auto-rejected with structured warning logs and cold-start fallback.
259+
- Observability additions:
260+
- `T5 stable_layout` checkpoint now emits `tickSummary`:
261+
- `fullTicks`, `deltaTicks`, `deltaRatio`,
262+
- `avgPayloadNodes`, `maxPayloadNodes`,
263+
- `tickFramesApplied`, `skippedEmptyDeltaFrames`.
264+
265+
Expected effect:
266+
- Lower startup transfer pressure in low-alpha settle phase.
267+
- Lower main-thread no-op paint ratio under high tick cadence.
268+
- Better safety against stale/corrupt snapshot recovery regressions.

docs/diataxis/en/reference/interfaces-and-runtime.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This reference tracks canonical API/runtime contracts.
2323
- `get_app_runtime_config`
2424
- Runtime bridge readiness sequencing via `whenReady()`.
2525

26-
## Startup Perf Telemetry and Pilot Profile (v1.6.9+ pilot)
26+
## Startup Perf Telemetry and Pilot Profile (v1.7.0+ pilot)
2727

2828
- Frontend startup checkpoints are emitted as one-shot logs:
2929
- `T0 app_boot`
@@ -43,10 +43,14 @@ This reference tracks canonical API/runtime contracts.
4343
- `startupProfile.deltaEnabled`
4444
- `startupProfile.deltaEpsilonPx`
4545
- `startupProfile.fullSyncEveryTicks`
46+
- `startupProfile.lowAlphaDeltaEpsilonMultiplier`
47+
- `startupProfile.lowAlphaFullSyncEveryTicks`
4648
- Worker -> main-thread tick transport contract (Phase 2):
4749
- `tickMode: 'full' | 'delta'`
4850
- `isDelta: boolean`
49-
- `nodes: [{ id, x, y }]` (delta mode only includes changed nodes)
51+
- `nodes: [{ id, i, x, y }]` (`i` is the worker node index fast-path; delta mode only includes changed nodes)
52+
- Startup tick application is frame-coalesced on main thread to reduce redundant repaint pressure.
53+
- `T5 stable_layout` details include `tickSummary` (`fullTicks`, `deltaTicks`, `deltaRatio`, payload stats).
5054
- Multi-platform startup pilot profiles:
5155
- `desktop_windows_pilot`: `26 FPS`, `400ms` edge delay, `1500ms` SVG cap window (`18000` links).
5256
- `desktop_macos_pilot`: `24 FPS`, `430ms` edge delay, `1700ms` SVG cap window (`15000` links).

docs/diataxis/zh/explanation/startup-node-update-acceleration-plan.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,32 @@ npm run perf:startup:matrix -- --root tmp/startup-logs --single-platform-label w
237237
- `TFS``2299.40ms -> 1679.50ms`,提升 `26.96%`
238238
- 最终报告:
239239
- `tmp/startup-logs/report-planb-final-windows.md`
240+
241+
## 17) v1.1 优化与风险护栏加固(2026-03-31)
242+
243+
- 运行时优化新增:
244+
- Worker Delta 在低 alpha 阶段支持自适应策略:
245+
- `lowAlphaDeltaEpsilonMultiplier`(稳定期增大 epsilon,降低传输载荷)
246+
- `lowAlphaFullSyncEveryTicks`(稳定期放宽全量同步周期)
247+
- Worker tick 载荷新增节点索引快速路径(`nodes[].i`),减少主线程按 id 回查开销。
248+
- 主线程启动期 tick 改为“帧级合并应用”:
249+
- 同一帧内多条 tick 合并,
250+
- 每帧仅一次位置回写与渲染触发,
251+
- 空 delta 帧自动跳过,减少无效重绘。
252+
- 风险规避新增:
253+
- Warm Snapshot 应用前增加严格校验:
254+
- 指纹一致性校验,
255+
- 快照时效校验(`STARTUP_LAYOUT_SNAPSHOT_MAX_AGE_MS`),
256+
- 节点/边数量一致性校验,
257+
- 位置覆盖率下限(`>=90%`)校验,规避局部损坏快照误恢复。
258+
- 非法快照自动拒绝并记录结构化告警日志,回退至冷启动路径。
259+
- 观测增强新增:
260+
- `T5 stable_layout` 增加 `tickSummary` 输出:
261+
- `fullTicks``deltaTicks``deltaRatio`
262+
- `avgPayloadNodes``maxPayloadNodes`
263+
- `tickFramesApplied``skippedEmptyDeltaFrames`
264+
265+
预期效果:
266+
- 进一步降低稳定阶段 Worker->主线程传输压力。
267+
- 降低高频 tick 下主线程无效重绘比例。
268+
- 提升快照恢复链路对陈旧/损坏数据的容错能力。

docs/diataxis/zh/reference/interfaces-and-runtime.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- `get_app_runtime_config`
2424
- Runtime bridge 通过 `whenReady()` 保障调用时序。
2525

26-
## 启动性能观测与试点 Profile(v1.6.9+ 试点)
26+
## 启动性能观测与试点 Profile(v1.7.0+ 试点)
2727

2828
- 前端启动关键点采用单次日志输出:
2929
- `T0 app_boot`
@@ -43,10 +43,14 @@
4343
- `startupProfile.deltaEnabled`
4444
- `startupProfile.deltaEpsilonPx`
4545
- `startupProfile.fullSyncEveryTicks`
46+
- `startupProfile.lowAlphaDeltaEpsilonMultiplier`
47+
- `startupProfile.lowAlphaFullSyncEveryTicks`
4648
- Worker -> 主线程 tick 传输契约(Phase 2):
4749
- `tickMode: 'full' | 'delta'`
4850
- `isDelta: boolean`
49-
- `nodes: [{ id, x, y }]`(delta 模式仅包含变化节点)
51+
- `nodes: [{ id, i, x, y }]``i` 为 Worker 节点索引快速路径;delta 模式仅包含变化节点)
52+
- 主线程对启动期 tick 采用帧级合并应用,降低重复重绘压力。
53+
- `T5 stable_layout` 附带 `tickSummary``fullTicks``deltaTicks``deltaRatio` 与载荷统计)。
5054
- 多平台启动试点 profile:
5155
- `desktop_windows_pilot``26 FPS``400ms` 边延迟、`1500ms` SVG 窗口(`18000` 条边)。
5256
- `desktop_macos_pilot``24 FPS``430ms` 边延迟、`1700ms` SVG 窗口(`15000` 条边)。

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "noteconnection",
3-
"version": "1.6.9",
3+
"version": "1.7.0",
44
"description": "Hierarchical Knowledge Graph Visualization System",
55
"main": "dist/src/server.js",
66
"bin": {

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "NoteConnection",
4-
"version": "1.6.9",
4+
"version": "1.7.0",
55
"identifier": "com.jacobinwwey.noteconnection",
66
"build": {
77
"beforeDevCommand": "",

0 commit comments

Comments
 (0)