Glory-Road / primes

Improving angular application step by step example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

primes

AngularJs application used to show step by step performance improvement

Read Improving Angular web app performance example - step by step profiling and optimizication for this application's example. Start by cloning this repo, checkout out tag step-0 and following the tutorial.

git clone git@github.com:bahmutov/primes.git
cd primes
git checkout step-0
open index.html

primes

You probably need to install a couple of 3rd party libraries before running

bower install angular-bindonce jquery angular-vs-repeat --force

Various checkpoints are tagged (step-0, step-1, etc).

  • step-0 initial application
  • step-1 removed try-catch
  • step-2 reusing found primes
  • step-3 checking fewer numbers per prime
  • step-4 profiling idle digest
  • step-5 removed unnecessary filters
  • step-6 one way binding using bind-once
  • step-7 generating HTML in code
  • step-8 2 batch generation
  • step-9 small batches
  • step-10 appending each table body
  • step-11 web workers
  • step-12 memory profiling
  • step-13 on-demand computation using infinite scroll
  • step-14 expensive copy in deep watch
  • step-15 limit work to visible elements
  • step-16 AngularJS v1.3.13
  • step-17 ng-class vs built-in form validation

If you need angular-free primes app for profiling, use bahmutov/vanilla-primes.

Small print

Author: Gleb Bahmutov © 2014

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet / open issue on Github

About

Improving angular application step by step example


Languages

Language:HTML 64.6%Language:JavaScript 35.4%