Repository navigation
build: voltip-server 的发布构建拆成 16 个代码生成单元 - #246
Merged
Merged
Conversation
发版候选的 Linux 腿每次都卡在打包 voltip-server:0.3.1 的候选这一步 19.3 分钟, 更早几次 27.7–34.3 分钟。release profile 的 codegen-units = 1 让这个 crate 成为一个 LLVM 模块,-Z time-passes 测得 LLVM 优化 862.7 秒(其余阶段合计不到 1 秒),ThinLTO 链接又 302.7 秒。 只给 voltip-server 设 16 个单元,其余包不变。本机 4 个并行任务下,库 1.7 秒、可执行 文件 24.5 秒;scripts/build-server-linux-x64.sh 冷构建加打包、无头运行检查共 144 秒, 包比 0.3.1 大 2.5%。发布脚本测试检查这项配置。
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #246 +/- ##
==========================================
- Coverage 93.57% 93.56% -0.01%
==========================================
Files 489 489
Lines 85860 85860
Branches 4909 4909
==========================================
- Hits 80340 80337 -3
- Misses 4851 4854 +3
Partials 669 669
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
发版候选的 Linux 腿每次都是最慢的一条,时间几乎都花在打包 voltip-server 上:0.3.1 的候选(42733161564)这一步 19.3 分钟,更早的几次 27.7–34.3 分钟。
release profile 设了
codegen-units = 1,voltip-server 整个 crate 因此是一个 LLVM 模块。本机用-Z time-passes测:LLVM 优化 862.7 秒,其余阶段合计不到 1 秒;可执行文件的 ThinLTO 链接 302.7 秒。桌面端主 crate 在同样设置下只要 1–2 分钟,所以问题出在这个模块的优化耗时急剧膨胀,不在代码量。改动
Cargo.toml只给 voltip-server 设codegen-units = 16,其余包仍是一个单元,ThinLTO 照样跨单元优化。ServerPackageBuild检查这项配置;改动前它失败(None != 16)。docs/runbook.md「CI 的速度」记下原因和数字。验证(本机)
scripts/build-server-linux-x64.sh从零构建、打包并无头运行检查,共 144 秒(改动前单服务端构建就要 20 分钟以上):--version输出voltip-server 0.3.1,--list-models5 条,--list-compute正常,库都来自包内。make verify通过(overall_exit=0 commit=cdb603d9)。PR CI 不构建服务端发布包,效果在下一次发版候选里看:Linux 腿的服务端一步预期从 19–34 分钟降到几分钟。