Angular adds metadata to the DOM to aid development tools. Turning this off in production can give a performance boost.

Versions used below

{
  "angular": "1.3.14"
}

What debug info?

Angular adds info to elements related to binding and scopes. If you’ve ever been poking around in devtools and noticed some elements have extra classes like

<div class="ng-binding">
  ...
</div>
<div class="ng-scope">
  ...
</div>

that’s part of it.

The debug info is added for tools like Protractor and Batarang. You probably won’t be running them in production so it’s safe to disable it.

Disabling debug info

angular.module('app').config(['$compileProvider', function($compileProvider) {
  $compileProvider.debugInfoEnabled(false);
}]);

There’s a way to get it back in a live app.

What does this save?

Angular will hit the DOM less.

Four lines starting here become no-ops with debug info disabled. Depending on the directive, some or all of those run roughly once per directive usage.