| | |
Iterating through HTML table row takes more cpu cycle in IE
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2008
Posts: 35
Reputation:
Solved Threads: 3
Hi All,
I am facing CPU utilization issue while iterating through HTML table rows. I am generating an HTML table dynamically using javascript
which contains atleast 500 rows. After the creation of table, the table cells are assigned with some values from a JSON object. The sample code for assigning cells values is shown below.
for(var i = 0;i<tbl.rows.length;i++){
tbl.rows[i].cells[0] = JSON.AAAA;
tbl.rows[i].cells[1] = JSON.BBBB;
...
...
tbl.rows[i].cells[12] = JSON.MMMM;
}
The execution of the above loop takes lots of cpu cycle. It takes the cpu upto 99.
Please help me to reduce the cpu utlization.
Thanks
I am facing CPU utilization issue while iterating through HTML table rows. I am generating an HTML table dynamically using javascript
which contains atleast 500 rows. After the creation of table, the table cells are assigned with some values from a JSON object. The sample code for assigning cells values is shown below.
for(var i = 0;i<tbl.rows.length;i++){
tbl.rows[i].cells[0] = JSON.AAAA;
tbl.rows[i].cells[1] = JSON.BBBB;
...
...
tbl.rows[i].cells[12] = JSON.MMMM;
}
The execution of the above loop takes lots of cpu cycle. It takes the cpu upto 99.
Please help me to reduce the cpu utlization.
Thanks
Maybe posting the *exact* code which is causing problems in your case would help in faster resolution of the issue at hand. And please use CODE tags when posting code to increase your chances of getting a reply since reading unindented code is a pain in the neck. Read the forum announcements to learn more about CODE tags.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: dependent drop down menus
- Next Thread: Post Bulk Data In AJAX request
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate api automatically blackjack browser bug calendar captchaformproblem checkbox child class close cookies createrange() cursor dependent disablefirebug dom dropdown editor element engine events explorer ext file firehose flash form forms game google gxt hiddenvalue highlightedword html htmlform ie8 iframe image() images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl math matrixcaptcha media microsoft mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player post progressbar rated regex runtime scroll search security session shopping size software sql star stars stretch synchronous text textarea tweet twitter unicode validation web website window windowsxp wysiwyg \n






