• Igor Minar's avatar
    AngularJS: add angularjs-perf version · a7abc6cf
    Igor Minar authored
    this one has better performance at the cost of complexity
    
    for a toy app like this one the difference is insignificant,
    but it might be good to see the two versions and compare them
    and based on that be able to make the trade-offs in real apps
    
    the angularjs version does deep watching of the todos array object.
    that means that it keeps an in memory copy of the whole array that
    is used for dirty checking in order to detect model mutations. For
    toy app like this it's totally fine and in fact encouraged practice
    since you are trading off a little bit of memory and performance
    for simplicity.
    
    However in a large project where you are dealing with array of 100s
    or 1000s of large objects you definitely don't want to use this
    approach. Instead you want to use a different way of doing the same
    thing, which requires more code but is a lot more efficient.
    a7abc6cf
angular.min.js 76 KB