OZONE Asylum
Forums
DHTML/Javascript
dhtml table update performance problem
This page's ID:
32020
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hello, I have a javascript function that modifies a small part of a large (>1000 rows) table by using dhtml. It is very slow, 15 seconds to modify 84 rows of the table on a regular desktop computer (4GB ram). If the table is smaller it is a lot faster to modify the same amount of rows, which leads me to believe that somehow the whole table is recalculated by the browser every time a row is updated. Is there a way to avoid this and have the recalculation of the table done only once all updates are finished? The function looks like this: function OnACalcComplete2(result, userContext, methodName) { var grid = document.getElementById('<%=GridView1.ClientID%>'); var arrResult = result.split("\r\n"); // Update grid var i = 0; var gridIndex = 0; var arrResultRow; var arrCell; var gridRow = grid.rows[0]; for (i = 0; i < arrResult.length; i++) { arrResultRow = arrResult[i].split("\t"); gridIndex = arrResultRow[0]; gridRow = grid.rows[gridIndex]; arrCell = arrResultRow[arrResultRow.length - 1].split(";"); gridRow.cells[gridRow.cells.length - 1].innerText = arrCell[0]; // This is the slow part } } Is there some possibility to do for instance "Deactivate html parser" before the update and "Activate after"? Best regards Johan Ingströmer
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »