trycatchx / RocketX

🔥🔥 android 端编译加速插件🚀 动态识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。
861 stars 104 forks source link

改动一行代码,一般需要编译多久?我现在还是需要2分多钟,感觉跟以前一样 #43

Closed WantGo closed 2 years ago

trycatchx commented 2 years ago

问题定位中

trycatchx commented 2 years ago

通过排查属于 多个 transform 无法增量导致 dexbuild 速度慢问题 @louis @JustAClamber

trycatchx commented 2 years ago

@louis @JustAClamber @WantGo 目前建议 使用 Bytex 进行优化处理

WantGo commented 2 years ago

能确定是这个原因导致的吗? @trycatchx

trycatchx commented 2 years ago

@WantGo 是的,因为过多 transform 执行,并且通过 asm 修改全局字节码,会导致大量 jar 包增量编译的丢失。从而导致buildDexTask 和 megerDexTask 耗时。 这个问题,我们小组需要进行研究解决。

当然你那边可以使用 bytex 进行多个 transform 合并,速度也会有大幅度提升。

WantGo commented 2 years ago

@trycatchx 你们可以集成进去吗?

trycatchx commented 2 years ago

@trycatchx 你们可以集成进去吗?

@WantGo 不行,bytex 要拆解每一个transform 里面的业务,没法做到自动化。 所以目前只能研究其他的方案。

WantGo commented 2 years ago

@trycatchx 你们可以集成进去吗?

@WantGo 不行,bytex 要拆解每一个transform 里面的业务,没法做到自动化。 所以目前只能研究其他的方案。

好的

trycatchx commented 2 years ago

@WantGo 目前建议关闭可关闭的 transform 或者使用 bytex 优化,目前没有更好的办法。