Skip to content
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

perf(core): 去除加载插件对getPackageArchiveInfo的依赖 #731

Merged
merged 2 commits into from
Dec 31, 2021

Conversation

shifujun
Copy link
Collaborator

由于PackageManager.getPackageArchiveInfo方法在解析较大的Manifest时速度很慢,
而且加载插件过程中只依赖很少量的字段,如className,theme等,所以在主路径不再依赖它,
而是依赖编译期生成好的PluginManifest类。

另一原因是getPackageArchiveInfo的返回类型没有公开API告诉我们Receiver的action字段。

在插件代码主动通过PackageManager获取信息时,再依赖getPackageArchiveInfo方法
获取MetaData等插件框架本身不需要的信息。

close #696

@shifujun shifujun changed the title perf(core): 去除加载插件对getPackageArchiveInfo的依赖 WIP: perf(core): 去除加载插件对getPackageArchiveInfo的依赖 Dec 30, 2021
通过PluginClassLoader新增方法loadPluginManifest可加载该类。

Tencent#696
由于PackageManager.getPackageArchiveInfo方法在解析较大的Manifest时速度很慢,
而且加载插件过程中只依赖很少量的字段,如className,theme等,所以在主路径不再依赖它,
而是依赖编译期生成好的PluginManifest类。

另一原因是getPackageArchiveInfo的返回类型没有公开API告诉我们Receiver的action字段。

在插件代码主动通过PackageManager获取信息时,再依赖getPackageArchiveInfo方法
获取MetaData等插件框架本身不需要的信息。

close Tencent#696
@shifujun shifujun changed the title WIP: perf(core): 去除加载插件对getPackageArchiveInfo的依赖 perf(core): 去除加载插件对getPackageArchiveInfo的依赖 Dec 30, 2021
@shifujun shifujun merged commit c8185fd into Tencent:master Dec 31, 2021
@shifujun shifujun deleted the manifest-parser branch December 31, 2021 03:15
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