Just 1000 rows causing long running scripts message.

Just 1000 rows causing long running scripts message.

vinitsharmavinitsharma Posts: 23Questions: 0Answers: 0
edited July 2013 in General
Hi Allan,
I am using datatables with asp.net gridview. My grid has 27 columns in total, out of which 4 columns are having controls inside them like one checkbox two textboxes and one having dropdown in it. I wasn't gonna notice the problem with my grid unless i checked it for mere 1000 records. My grid shows 16 columns at front end and the rest of the columns are kept to display:none as their values were being required during client side save operations. The problem being faced is my please wait preloader turns round for only 2 seconds after which it takes a loads amount of time to get the datatable render the html table in browser, in between of which i get the message once as "The following file is causing long running scripts : datatable.min.js: 42." As I am using asp.net so viewstate does comes into the picture, and for that I have already used a viewstate compression method, which was reducing my data being sent in an asynchronus request from 6 MB to 3 MB, making no change in the speed at which the datatable was being rendered into the browser. So I don't understand what things cause these js files to go into infinite loops or what things in the grid gives a big load to the browser causing the browser to show long running scripts message. I need to optimize my grid so as to spend time only at server side and no extra time at client side. I need your help regarding this. Any kind of help is welcomed. Thanks.

P.S.: I have already disabled all those bSortClasses and other stuffs, which causes the datatable to run slower. My grid has that normal column header sorting enabled only.

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    6MB (uncompressed) for 1000 rows?! That's a lot of data for each row!

    Can you please link us to a test page showing the problem so we can offer some help: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read .

    Also have you enabled deferred rendering?

    Allan
This discussion has been closed.