Improving Application Performance.

The development team at Google have always focused on the performance improvements, so they first identified the common errors made across the ecosystem, they recently found that most of the developers were using reflect-metadata in their production, which actually was required only in the development.

So, to fix this problem, they’ve made a part of Angular 7 to automatically remove this from the polyfills.ts file, and then include it as a build step during building application in JIT mode, removal of this polyfill from the production is done by default.

To speed up the performance new applications will warn when the initial bundle is more than 2MB and will error at 5MB, These defaults can be easily changed in your angular.json file. You simply need to include somewhat about budgets along with your preferred warning and error sizes.

angular.json

"budgets": [{
  "type": "initial",
  "maximumWarning": "2mb",
  "maximumError": "5mb"
}] 
                             

These budgets align with warnings taking advantage of Chrome’s Data Saver features which are shown to users.

Chrome’s Data Saver features

Chrome Data Server