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

I read the documentation from the angular website about debugInfoEnabled . It is still not clear with the concept of how $compileProvider.debugInfoEnabled(false) inside angular config can improve application performance by removing class class bindings (angular-directives) like ng-scope and ng-isolated-scope .

Does anyone know how performance gains can happen by setting debugInfoEnabled to false in $compileProvider ? Can someone help me clear my concept of angular $compileProvider.debugInfoEnabled function angular 1.3?

Any help would be appreciated, thanks in advance :)

+7
javascript debugging angularjs angularjs-compile
source share
1 answer

These classes that are added to your DOM elements are directives (a directive can be elements, attributes, classes, or comments).

When angular compiles the DOM and falls into the directive, it then passes logic through this directive to modify, manage, update, or perform any task that the angular directive requests.

For example, it will take your ng-repeat directives and build some DOM elements accordingly.

By removing these directives (classes such as ng-scope and ng-isolated-scope), angular will not stop at these places and will not execute logic. Because of this, an increase in productivity is achieved.

+11
source share

All Articles