角度的“部分” vs“ full”汇编模式?

发布于 2025-01-28 12:14:36 字数 54 浏览 3 评论 0原文

与“完整”汇编模式相比,为什么在“部分”汇编模式中编译的库在消费者应用程序内部如此缓慢地构建?

Why the library compiled in the "partial" compilation mode builds so slowly inside of the consumer application, compared to the "full" compilation mode?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挖个坑埋了你 2025-02-04 12:14:36

如文档所述:

完整根据当前正在使用的Angular版本生成完全编译的代码。

partial以稳定但中间形式生成代码。

实际上,这意味着与完整相比,partial编译更慢,因为partial编译必须构建比完整的构建更兼容的目标代码。参见 this 考虑常春藤的细节。希望下一张图像也可以帮助您理解:
中间汇编

As the documentation states:

full Generates fully AOT-compiled code according to the version of Angular that is currently being used.

partial Generates code in a stable, but intermediate form suitable for a published library.

Effectively this means that the partial compiles more slowly compared to full because the partial compilation has to build more compatible target code than with full. See this post for further details considering Ivy. Hope the next image helps you too with understanding:
intermediate compilation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文