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
Reply

Join Date: Jan 2008
Posts: 35
Reputation: anish.anick is an unknown quantity at this point 
Solved Threads: 3
anish.anick anish.anick is offline Offline
Light Poster

Iterating through HTML table row takes more cpu cycle in IE

 
0
  #1
Dec 29th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,642
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 472
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Iterating through HTML table row takes more cpu cycle in IE

 
0
  #2
Dec 29th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC