Coder Social home page Coder Social logo

angular-performance-example's Introduction

Angular JIT vs AOT

Chrome timeline performance

Angular 2

cd angular2
npm install

# JIT Compilation
npm run build:prod
cd dist && httpserver

# AOT Compilation
npm run build:aot:prod
cd dist && httpserver

Angular 4

cd angular4
npm install

# JIT Compilation
npm run build:prod
cd dist && httpserver

# AOT Compilation
npm run build:aot:prod
cd dist && httpserver

Go to: localhost:8000, open Chrome Dev Tools on the perfomance tab, and run the page several times to see the average download results

Angular 5+

Usage AOT ng build --aot --prod or JIT ng build --no-aot --prod --build-optimizer false

Note

  • In the version of Angular 2, the assembly drops, however, the files are successfully compiled, after which you can start the local web server (the problem was solved in Angular 4)

jsfiddle: http://jsfiddle.net/dhfag8w4/

angular-performance-example's People

Contributors

splincode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.