Angular VS ExtJS

JavaScript performance comparison

Revision 28 of this test case created

Preparation code

<!-- JQURY -->
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>

<!-- ANGULAR -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js" ng:autobind></script>
<script>
 
var Ctrl=function($scope){
        $scope.data=[];
}
</script>
<div ng:app>
<ul ng-controller="Ctrl" id="angList"  >
<li ng-repeat="item in data">{{item}}</li>
</ul>

<script>
var SetANG= function(data){
$('#angList').scope().data=data;
$('#angList').scope().$apply(function(){});
};
</script>       


<!-- ANGULAR Update -->
 <script>
 
var CtrlUpdate=function($scope){
        $scope.data=[];
}
</script>

<ul ng-controller="CtrlUpdate" id="angListUpdate"  >
<li ng-repeat="item in data">{{item}}</li>
</ul></div>
</div>
<script>
var SetANGUpdate= function(data){
$('#angListUpdate').scope().data=data;
$('#angListUpdate').scope().$apply(function(){});
};
</script>       


<!-- EXT -->
<script  src="http://docs.sencha.com/ext-js/4-2/extjs-build/ext-all.js"></script>
<div id="extme"></div>
<script>
 
var EXTData= [ ];
var store = Ext.create('Ext.data.Store', {
    storeId:'employeeStore',
    fields:['name' ],
    data: EXTData
   
});
Ext.create('Ext.view.View', {
    store: store,
    tpl: new Ext.XTemplate(
        '<tpl for=".">',
          '<p>{name}</p>',
        '</tpl>'
    ),
    renderTo: Ext.getBody()
});
 
var SetEXT=function (data){
store.removeAll();
store.add(data);
}

var ANG50ID=[];
for (var i=0; i<50;i++){
ANG50ID.push('ITEM');
};
var EXT50ID=[];
for (var i=0; i<50;i++){
EXT50ID.push({name:'ITEM'});
};



var ANG100ID=[];
for (var i=0; i<100;i++){
ANG100ID.push('ITEM');
};
var EXT100ID=[];
for (var i=0; i<100;i++){
EXT100ID.push({name:'ITEM'});
};


var ANG1000ID=[];
for (var i=0; i<1000;i++){
ANG1000ID.push('ITEM');
};
var EXT1000ID=[];
for (var i=0; i<1000;i++){
EXT1000ID.push({name:'ITEM'});
};

</script>
<script>
Benchmark.prototype.setup = function() {
    SetANG([]);
    SetEXT([]);
   
    SetANGUpdate(ANG100ID);
};
</script>

Preparation code output

  • {{item}}
  • {{item}}

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Angular 0-50 Items
SetANG(ANG50ID);
 
pending…
ExtJS 0-50 Items
SetEXT(EXT50ID);
pending…
Angular 0-100 Items
SetANG(ANG100ID);
pending…
ExtJS 0-100 Items
SetEXT(EXT100ID);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment