Hello,
I'm trying to write a grid function that lets the user mark a group of records that contain a certain value as removed. But, the performance is very slow in my tests. I'm trying to use the suppressRefresh param that appears to be undocumented but is used by grid.markSelectionRemoved() but it is not helping performance. In my tests, it is taking 6-8 seconds to mark about 50 grid records as removed. Here is the function I am using. Any idea why this would be so slow with Smartclient 9.1 and Chrome 35 on Windows 7?
I'm trying to write a grid function that lets the user mark a group of records that contain a certain value as removed. But, the performance is very slow in my tests. I'm trying to use the suppressRefresh param that appears to be undocumented but is used by grid.markSelectionRemoved() but it is not helping performance. In my tests, it is taking 6-8 seconds to mark about 50 grid records as removed. Here is the function I am using. Any idea why this would be so slow with Smartclient 9.1 and Chrome 35 on Windows 7?
Code:
function gridMarkRecordsAsRemoved(grid,property,propertyValueToRemove){ var refreshGrid=false; var dataSet = getGridDataSet(grid); if(dataSet!=null){ var j = dataSet.getLength(); for (var i = 0; i < j; i++){ var record = grid.getRecord(i); if(record[property]!=null && record[property]==propertyValueToRemove){ //isc.Log.logInfo("in gridMarkRecordsAsRemoved, for record.ticker=" + record.ticker + " calling markRecordRemoved") //calling markRecordRemoved but setting suppressRefresh to true grid.markRecordRemoved(i,true); refreshGrid=true; //isc.Log.logInfo("in gridMarkRecordsAsRemoved, for record.ticker=" + record.ticker + " DONE calling markRecordRemoved") } } } if(refreshGrid){ //isc.Log.logInfo("gridMarkRecordsAsRemoved, calling grid.markForRedraw") grid.markForRedraw(); //isc.Log.logInfo("gridMarkRecordsAsRemoved, DONE calling grid.markForRedraw") } }
Comment