$compileProvider.debugInfoEnabled 设置为 false 如何提高 angularjs 1.3 中的性能?

How $compileProvider.debugInfoEnabled set to false improve performance in angularjs 1.3?

我从 angular 网站上阅读了关于 debugInfoEnabled 的文档。 仍然不清楚概念,angular 配置中的 $compileProvider.debugInfoEnabled(false) 如何通过删除元素级别 class(angular-指令)绑定来提高应用程序的性能,例如 ng-scopeng-isolated-scope.

有谁知道,如何通过在 $compileProvider 中将 debugInfoEnabled 设置为 false 来提高性能? 谁能帮我理清我对 angular $compileProvider.debugInfoEnabled 功能 angular 1.3 的概念?

任何帮助将不胜感激,提前致谢:)

添加到您的 DOM 元素的这些 类 是指令(指令可以是元素、属性、类 或注释)。

当 angular 编译 DOM 并命中指令时,它会运行指令逻辑以更改、操作、更新或执行指令要求的任何任务 angular 要做。

例如,它将采用您的 ng-repeat 指令并相应地构建多个 DOM 元素。

通过删除这些指令(类 如 ng-scope 和 ng-isolated-scope)angular 将不会在这些位置停止并执行逻辑。因此,实现了性能提升。