Improving Angular performance with 1 line of code

myApp.config(['$compileProvider', function ($compileProvider) {

I’m on and I right click over some text and click “Inspect Element” for I’m not sure what reason, as any good web developer does. Generally, I’ll see nothing particularly interesting as I’m reviewing the elements that comprise the fabric of our modern WWW; usually it’s divs in divs in divs and about 100 classes per each (and that’s fine as far as this developer is concerned). On this site, however, something caught my eye.

This is actually talked about in the AngularJS Docs:

You can disable this in production for a significant performance boost with:

myApp.config(['$compileProvider', function ($compileProvider) {

If you wish to debug an application with this information then you should open up a debug console in the browser then call this method directly in this console:


The page should reload and the debug information should now be available.

Handy to keep in mind for production Angular apps.


Flybase helps you build real-time, collaborative apps in a fraction of the time with our API. Flybase lets you create fully interactive apps with just frontend code. Learn More

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on email
Share on print