Skip to content

大幅优化启动性能,热启动加速16x,冷启动加速8x。#343

Open
ZhuYizhou2333 wants to merge 2 commits intovolcengine:mainfrom
ZhuYizhou2333:dev
Open

大幅优化启动性能,热启动加速16x,冷启动加速8x。#343
ZhuYizhou2333 wants to merge 2 commits intovolcengine:mainfrom
ZhuYizhou2333:dev

Conversation

@ZhuYizhou2333
Copy link
Contributor

Description

修改内容:

  1. 优化前后端协同逻辑,当后端成功启动时,前端直接进入,而不是强制等待20s。
  2. 优化后段打包方式,从原先onefile切换为onedir,大幅减少解包时间。

本地测试:
Mac机器可流畅打包构建并启动,实现大幅加速。

#338

- `frontend/src/main/backend.ts`: 添加健康检查选项,优化健康检查逻辑
- `frontend/src/main/index.ts`: 移除不必要的后端启动检查
- `frontend/externals/python/window_capture/requirements.txt`: 修复依赖项格式
…uce startup latency

Goal: eliminate PyInstaller onefile extraction overhead during app startup and improve perceived launch speed.

Changes:

- /Users/zhuyizhou/MineContext/opencontext.spec: use EXE(exclude_binaries=True) + COLLECT to output onedir backend runtime.

- /Users/zhuyizhou/MineContext/frontend/scripts/copy-prebuilt-backend.js: copy full /dist/main onedir runtime into frontend/backend.

- /Users/zhuyizhou/MineContext/frontend/electron-builder.yml: include all backend runtime files (not only main/config) in extraResources.

- /Users/zhuyizhou/MineContext/build.sh and /Users/zhuyizhou/MineContext/build.bat: verify onedir output path and update run hints.

Performance impact (based on 20s progress baseline):

- Cold start now reaches app at ~13% => ~2.6s (from 20s), about 87% reduction (~7.7x faster).

- Second start now reaches app at ~6% => ~1.2s (from 20s), about 94% reduction (~16.7x faster).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant