View on GitHub

Ng-cells Performance

Download this project as a .zip file Download this project as a tar.gz file


Data will be generated after 2 seconds and the table updated automatically once done. See the code below

Rows: {{rows}}, Columns: {{cols}} = {{rows * cols}} cells

You can change the rows and cols parameters in the URL and reload the page to test out performance. Be careful though, huge numbers will overload your browser because of the amount of data generated and not the rendering. It has been tested successfully with numbers up to 100k rows x 1k cols (this means 100 millions cells) on a Macbook Pro (Firefox, Chrome, Opera & Safari).


<div ngc-table
    left-column-number="2" left-column-widths="'60px'"
    center-column-number="5" center-column-widths="'60px'"
    right-column-number="2" right-column-widths="'60px'"
    header-row-number="2" header-row-heights="'15px'"
    row-number='15' row-heights="'15px'"
    footer-row-number="3" footer-row-heights="'15px'"></div>


angular.module('ngcTableDirectiveTest', ['ngcTableDirective'])
    .controller('TestCtrl', function($scope, $timeout, $location) {
        // Initialize the data as empty array
        $ = [];
        $scope.rows = 0;
        $scope.cols = 0;

        // After 2000 ms, create the data
        $timeout(function() {
            // Get the rows and columns values from the URL
            $scope.rows = parseInt($ || 1000;
            $scope.cols = parseInt($ || 1000;

            // Create a new array and fill it
            var newData = [];
            for (var row = 0; row < $scope.rows; row++) {
                var rowContent = [];
                for (var col = 1; col < $scope.cols + 1; col++) {
                    rowContent.push(row * col + col);
            // Assign the new array to the data of the scope
            $ = newData;
        }, 2000);