Angular adds metadata to the DOM to aid development tools. Turning this off in production can give a performance boost.
Versions used below
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
that’s part of it.
Disabling debug info
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.