Web Analytics Made Easy -
StatCounter multiple JS commands causing CPU overload - CodingForum

Announcement

Collapse
No announcement yet.

multiple JS commands causing CPU overload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • multiple JS commands causing CPU overload

    Hi all, I have been banging my head against the wall for a week now on this issue so if anyone can help it would be greatly appreciated.
    Here is the problem description:

    I have an html page with a table made of many rows each of which has a dozen cells, each of which has a value in it. I start of by reading data from a static txt file, do some calculations and draw the table (all that with php). After that, I use AJAX to read that same static file (it is being updated in the background by the server) and update the values of the original table which have changed.

    Here is the problem, the first time i loop through my static file data and compare it to the contents of the table the CPU load on the viewer's PC can reach 100% and stay there for up to 20seconds(!!) (that value can varry and is about 20 seconds when the table has around 400 rows, with a table of 60 or 70 rows there is no load worth mentioning). The 2nd or 3rd or nth time the script makes the same comparisons it updates the table contents on the fly without any delays!!

    thanx for your time
Working...
X