Urgent: addRow gets progressively slower

I am havig a problem with the addRow call. it gets progressivley slower with each record I add to to. I need to add 500 rows to the grid and after it gets to about 250 rows it becomes progressvily slower to add a new row. At 320 rows it is taking almost 1/2 second to add a new row to the table. With another 180 rows to add this time really adds up.

What do I need to look for to resolve this? We have a demo on Tuesday which can make or break the project and we really like the L&F of the grid component I would hate to have to take it out.

    srGrid = new dhtmlXGridObject(‘searchResultsGrid’);

    srGrid.setHeader(“Row #,Document ID,Collection Name,Geo Ref,Load Date,Confidence,Country Confidence,Latitude,Longitude,Snippet”);









    var outDataArr = new Array();

    var docId = resultXml.getAttribute(‘docId’);

    var latitude = resultXml.getAttribute(‘latitude’);

    var longitude = resultXml.getAttribute(‘longitude’);

    var detailsNdxRef = ‘’+ (j+1)+’’;


    var detailsDocIdRef = ‘’ + docId + ‘’;










// This call gets progressively slower

    srGrid.addRow((j+1), outDataArr);

j: is our counter and the unique id

outDataArr: the array of data


The addRow is not purposed for mass adding ( after each row added, grid updates view, so it takes a lot of time )
To improve perfomance you can

a) enable smart rendering mode
b) use grid.parse and array of data

var g_data=[];

// srGrid.addRow((j+1), outDataArr); <= not used

In such case all data will be stored at g_data matrix, which will be loaded by a single grid.parse call
In smartRendering mode it may take a lesser than 1 sec. for 500 rows in single dataset.

Thanks, I was able to generate the xml string and use the parse method. much, much better. I’m loving these tools more and more each day.

Thank you again.

I’m trying to get work to purchase the suite of tools for our site redesign. I am looking forward to this very much.