Skip to content

update wasmsplit.md #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Design/WasmSplit.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- [等待分包](#等待分包)
- [android收集 + iOS收集](#android收集--ios收集)
- [重复收集与生成](#重复收集与生成)
- [微信优化项](#微信优化项)
- [函数名获取与手动上报](#函数名获取与手动上报)
- [关闭分包](#关闭分包)
- [注意事项](#注意事项)
- [CI工具](#CI工具)
Expand Down Expand Up @@ -189,6 +191,22 @@ android和iOS收集完,基本就可以测试和发布了

**每次生成会当前的分包version会加1**

#### 微信优化项
在“后台服务版本:6”的基础上支持选择开启特殊优化。
- **profile包性能优化**会修改函数调用上报的记录方式,使得运行性能接近 release 包,提高收集函数的效率,并且不存在什么负面影响,默认开启。
- **函数量优化**可以进一步减小分包后的wasm包中的函数量,从而减小编译内存占用。但是会对运行性能有负面影响,新版本 UnityPlugin 会上报用于优化此功能的信息,可将性能损耗控制在 5% 以内且避免一些异常情况。所以为了避免严重的负面影响只在unityPluginVersion≥1.2.69时显示勾选框,且默认不启用。
![微信优化项](WasmSplitOptimization.png)

#### 函数名获取与手动上报

为了方便开发者分析首包函数来精简代码,提供了“已收集函数名获取”和“手动上报”的能力。

点击“获取首包函数名和新增函数的函数名”会下载并打开两个txt文件分别包含首包函数名和新增函数名。

点击“选择函数名文件手动上报”即可选择之前下载的函数名文件上报,方便在切换 appid 后也能实现增量分包,也可以针对自己游戏预先准备好一份函数名文件手动上传来节约人工运行收集函数的时间。

![函数名获取与手动上报](WasmSplitFuncName.png)

### 关闭分包

如果想回退到未分包的版本,点击关闭代码分包即可
Expand Down
Binary file added Design/WasmSplitFuncName.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Design/WasmSplitOptimization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading