Files
future-harmony-freeze-oom-fix/harmony-ths-futures-freeze/doc/change-notes/01-communication-source-dependency.md
T

2.0 KiB

通信库源码联调依赖说明

修复提交

仓库 分支 Commit ID 说明
ohos_mobile_lib_communication work-freeze-lib-communication-1.1.1 031d4cf221b4da6d9aaf2db443ba293559a0d4a5 通信 Worker 解码与队列优化(本说明所支撑的修复)

本笔记为通信库源码联调/依赖说明,非生产修复本身;其支撑的修复见 0304

目的

解压与曲线修复基于 lib_communication 1.1.1-beta.1,基线提交为 7d3f126,与应用原有 lib_communication20250903.har 的源码版本一致。性能验证期间曾将相邻仓库中的通信模块复制到当前工程 lib_communication/,以便临时加日志、打点和抓取 trace。

修改文件

  • oh-package.json5
  • build-profile.json5
  • base_ugc/oh-package.json5
  • biz_forecast/oh-package.json5
  • service_aigroup/oh-package.json5
  • lib_communication/

接入配置

验证期间,根依赖和 overrides 使用 file:./lib_communication,模块内直接依赖使用 file:../lib_communication,根 build-profile.json5 将其注册为 HAR 模块。构建 entry 时直接编译这份通信源码。

新增 Worker 的运行时导入闭包在验证期间按最小范围登记到子线程门禁:

  • ConcurrentDecodeWorker.ts -> @ohos.worker
  • ConcurrentDecodeWorker.ts -> HXZip.ts

影响与风险

本地源码保留原公开接口,包含 Worker 解压和曲线解析实现。该目录仅用于性能验证,不应作为正式交付方式。验证结束后已删除根 build-profile.json5 中的模块注册,并将根工程及三个业务模块的依赖恢复为 libs/lib_communication20250903.har

验证

同一源码构建的通信库 debug HAR 及 entry@default debug HAP 均已完成构建、安装和运行验证。三轮 A/B 测试确认主线程 CPU 时间中位数下降 20.2%,详细数据见 06-communication-worker-ab-performance.md;正式交付仍需发布并接入包含修复的新版 HAR。