diff --git a/modules/benchmarks/e2e_test/largetable_perf.ts b/modules/benchmarks/e2e_test/largetable_perf.ts index 6f5b54f2ba..8760987cec 100644 --- a/modules/benchmarks/e2e_test/largetable_perf.ts +++ b/modules/benchmarks/e2e_test/largetable_perf.ts @@ -29,6 +29,20 @@ describe('ng2 largetable benchmark', function() { }); }); + it('should log the stats without viewcache', function(done) { + runClickBenchmark({ + url: URL, + buttons: ['#ng2DestroyDom', '#ng2CreateDom'], + id: 'ng2.largetable.interpolation.plain', + params: [ + {name: 'rows', value: 20, scale: 'sqrt'}, + {name: 'columns', value: 20, scale: 'sqrt'}, + {name: 'benchmarkType', value: 'interpolation'}, + {name: 'viewcache', value: 'false'} + ] + }).then(done, done.fail); + }); + it('should log the baseline stats', function(done) { runClickBenchmark({ diff --git a/modules/benchmarks/src/largetable/largetable_benchmark.html b/modules/benchmarks/src/largetable/largetable_benchmark.html index 85718d1228..1c49130c7f 100644 --- a/modules/benchmarks/src/largetable/largetable_benchmark.html +++ b/modules/benchmarks/src/largetable/largetable_benchmark.html @@ -9,6 +9,16 @@
+
+ Use Viewcache: + + +
+
rows: diff --git a/modules/benchmarks/src/largetable/largetable_benchmark.ts b/modules/benchmarks/src/largetable/largetable_benchmark.ts index 6e08671004..e8a8d22173 100644 --- a/modules/benchmarks/src/largetable/largetable_benchmark.ts +++ b/modules/benchmarks/src/largetable/largetable_benchmark.ts @@ -16,6 +16,7 @@ import { import {NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/directives'; import {BrowserDomAdapter} from 'angular2/src/dom/browser_adapter'; +import {APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/compiler/view_pool'; import {ListWrapper} from 'angular2/src/facade/collection'; @@ -27,11 +28,13 @@ export const LARGETABLE_ROWS = 'LargetableComponent.rows'; export const LARGETABLE_COLS = 'LargetableComponent.cols'; function _createBindings() { + var viewCacheCapacity = getStringParameter('viewcache') == 'true' ? 10000 : 1; return [ bind(BENCHMARK_TYPE) .toValue(getStringParameter('benchmarkType')), bind(LARGETABLE_ROWS).toValue(getIntParameter('rows')), - bind(LARGETABLE_COLS).toValue(getIntParameter('columns')) + bind(LARGETABLE_COLS).toValue(getIntParameter('columns')), + bind(APP_VIEW_POOL_CAPACITY).toValue(viewCacheCapacity) ]; }