More IE7 CPU spiking

A while ago I wrote about an issue with CPU spiking in Internet Explorer 7, recently I encountered another instance of this that required a different fix. To recap, we have a rich-client drag-drop interface across two scrolling panes.  You can drag and drop within the main pane on the left (a nested list with 'sections' and 'items') and you can also drag things from a pane on the right onto the pane on the left.  A read-only display of this (without the drag/drop and right-hand pane can he seen here for reference. Last time, we had a CPU spike causing slow juddering drag/drop when there were were only about 7 or 8 items in the left hadn pane.  This got progressively worse as you dragged more items onto the list.  After trying various things from Steve Souders' excellent blog and other Googling it ended up with selectively switching elemts of the screen off until I could narrrow it down to see what was causing the problem.  It turned out to require a few CSS 'min-height's being set on a couple of attributes but I'm not 100% sure why.  I'm guessing it could be some manifestation of the IE 'hasLayout' problem and the min-height could have been the equivilent to the Holly Hack to coax the IE rendering engine into working properly. This time however the same symptoms manifested themselves but a different cause and different solution was found.   More selective disabling of page elements/events and head-scratching later this one turned out to be caused by an absolute positioned button in the top-right of the left-hand scrolling pane.  There was no need for this to be absolutely positioned so I just tweaked the CSS again to float it to the right of the list title and, hey-presto, IE7 CPU spike goes away and performance returns to normal. It's these kind of things that give IE the reputation it has with web developers…. 🙂   Love it or hate it, it certainly gives you some interesting issues to sort out.

Leave a Reply

Your email address will not be published. Required fields are marked *