G
Guest
I've created a web application using ASP .NET that creates tables similar to
Gantt charts. There are 5 tables will 180 cells each, so there are about 900
cells on the web page. I had javascript in the attributes of each cell to
react to various events (onmouseout, onmouseover, onmouseup, onmousedown) to
handle highlighting and selecting cells in the chart.
I wanted to try to make the application more efficient and have a smaller
HTML file, so I removed the javascript from the cells and placed it in a
behavior file (htc file) and gave each cell a CSS class, which pointed to the
behavior file. The application works just as it did before and I managed to
shrink the HTML file from 450 KB to 50 KB.
The problem is that when I have a postback or go to any other web page
Internet Explorer takes up 99% of the CPU cycles for a couple seconds when
the page is unloading. This means that I could have my application page up in
IE and even if I type a web site in the address bar, IE is still slow for a
couple seconds going to the other web site. Firefox doesn't seem to be nearly
as slow.
Are there any best practices for DHTML behaviors regarding this kind of use
that I'm not aware of? Should I expect this slowness if 900 cells have a CSS
class that point to the behavior? I didn't have this problem when there was
javascript in each of the 900 cells.
Gantt charts. There are 5 tables will 180 cells each, so there are about 900
cells on the web page. I had javascript in the attributes of each cell to
react to various events (onmouseout, onmouseover, onmouseup, onmousedown) to
handle highlighting and selecting cells in the chart.
I wanted to try to make the application more efficient and have a smaller
HTML file, so I removed the javascript from the cells and placed it in a
behavior file (htc file) and gave each cell a CSS class, which pointed to the
behavior file. The application works just as it did before and I managed to
shrink the HTML file from 450 KB to 50 KB.
The problem is that when I have a postback or go to any other web page
Internet Explorer takes up 99% of the CPU cycles for a couple seconds when
the page is unloading. This means that I could have my application page up in
IE and even if I type a web site in the address bar, IE is still slow for a
couple seconds going to the other web site. Firefox doesn't seem to be nearly
as slow.
Are there any best practices for DHTML behaviors regarding this kind of use
that I'm not aware of? Should I expect this slowness if 900 cells have a CSS
class that point to the behavior? I didn't have this problem when there was
javascript in each of the 900 cells.