Author Topic: Loading page with big data  (Read 2981 times)

youngvan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 42
    • View Profile
Loading page with big data
« on: February 24, 2015, 09:56:48 pm »
Hello!

I've been testing your great plugin and found next issue with loading: if table consist of 5-7 thousands of rows and 100 columns -page loads to slow -about to 4 minutes in chrome. I tried others grids with the same data- some of them load up to 10 times faster;
Also I tested ParamQuery with different options. There was some problem with scroll as well- but I fixed it by setting virtualX: true and virtualY: true.
How can I force loading of page, maybe there some tricks or params?
Could you help me with this problem? Thanks in advance!

My init params:

Quote
var obj = {
    "wrap": false,
    "editable": false,
    "resizable": false,
    "draggable": false,
    "showTitle": false,
    "showHeader": true,
    "stripeRows": true,
    "virtualX": true,
    "collapsible": false,
    "showTitleType": false,
    "virtualXHeader": false,
    "filterModel": {
        "on": true,
        "mode": "AND",
        "header": true
    },
    "scrollModel": {
        "pace": "fast"
    },
    "selectionModel": {
        "type": "row",
        "mode": "block"
    },
    "freezeCols": 4
};

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Loading page with big data
« Reply #1 on: February 24, 2015, 10:51:33 pm »
I don't see virtualY: true in your init params.

There are 2 different phases before grid displays data: 1) Data loading & 2) Data binding.

Data loading is loading of data in browser from server ( usually via $.ajax or $.getJSON or grid's dataModel.location =="remote" ) and data binding is display of data in the grid when the required data is available in browser's memory.

When virtualX: true & virtualY: true is used, data binding shouldn't take roughly more than a second irrespective of the number of rows or columns.

Slow loading of data ( data loading ) over the network can be made fast by loading data in chunks, say if you have 5 - 7 thousand rows, try to load 500 - 1000 records at a time.


Other factors which can make it slow:

1) use of freeze* options in non virtual mode especially when the number of rows / columns is large.

2) use of inefficient or too much code in column.render callbacks.

3) use of inefficient or too much code in refresh event.

4) use of virtualXHeader: false can slow down the grid a bit if there are large number of columns.