jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Very poor response time with IE
This topic contains 2 replies, has 2 voices, and was last updated by DaveB 12 years, 2 months ago.
-
Author
-
Hi Peter,
There may not be much you can do for this since we are all familiar with what a poor browser IE has become, but unfortunately, IE is still what my shop uses. Anyhow, I have noticed poor response time in general on IE. Thinks like clicking a check box may take a second or two to check/uncheck after clicking. One bit of code I have had really poor performance with was a small function I wrote that basically moves rows from one grid to another (assuming the same structure in both grids). On IE to move say 30 rows this may take over a minute and will even generate the warning message saying that the script is running slowly. On other browsers, while still not terrific, it completes in 2-3 seconds. Any thoughts on anything I could do to get this to perform better? Our show is using a dumb-ed down version of IE8 for legacy app compatibility and I am using jqWidgets 2.7.0
/************************************ rowsMove(source, dest) ***********************************************
Method: rowsMove: Copies selected rows from source to dest grid
Arguments: source: The ID of the source grid (with the # sign before it)
dest: The ID of the source grid (with the # sign before it)
*********************************************************************************************/
function moveRows(source, dest)
{var selectedRows = $(source).jqxGrid(‘getselectedrowindexes’);
var i;
if (selectedRows!=null)
{
for (i=selectedRows.length;i>0;i–)
{
// Get the data in the selected row in the source
// @param row index.
var data = $(source).jqxGrid(‘getrowdata’, selectedRows[i-1]);var newRowIndex = $(dest).jqxGrid(‘getdatainformation’).rowscount;
//var datarow = generatedata(1);
// add the data from the selected row to the destination table
// @param row id. Pass null, if you want the new id to be auto-generated or pass a row id.
// @param row data. The expected value is a JSON Object.
var value = $(dest).jqxGrid(‘addrow’, null, data);$(dest).jqxGrid(‘ensurerowvisible’, newRowIndex);
if(typeof postRowMove == ‘function’)
{postRowMove(dest, newRowIndex);}// Now delete the selected source data (Get the RowID from the index first)
// @param row index.
var id = $(source).jqxGrid(‘getrowid’, selectedRows[i-1]);
// @param row id. Use the ‘getrowid’ method to get the id of a row.
var value = $(source).jqxGrid(‘deleterow’, id);
}
}
}Hi DaveB,
If you move 30 rows then you will have 30 re-renders unless you use the “beginupdate” and “endupdate” methods of jqxGrid.
Best Regards,
Peter StoevHuge difference! Thanks you, keep up the great work on this project!
-
AuthorPosts
You must be logged in to reply to this topic.