Monday, April 13, 2015

Easy Angular Performance Boost

We've been working on profiling and optimizing our Angular app at work.  During that process I found an easy performance tweak that was slipped into Angular somewhere around version 1.3x.  It's simply setting provided by the compile provider.
myApp.config(['$compileProvider', function ($compileProvider) {
Surprisingly, this provided a very visible performance increase in our application.  It works by removing ng-scope and ng-isolated-scope directives from the code, meaning less work for the browser as it runs.

If your running Angular >=1.3x and you haven't set this already check it out!

No comments:

Post a Comment