Monday, July 23, 2007

The Dangers of Flash

As I sit here and use my computer (2.4 GHz MacBook Pro), I noticed that the laptop was getting quite hot. I looked up at smcFanControl, and noticed temperatures between 165 and 175 Fahrenheit. The fans had spun up to nearly 6000 RPM (from a base of 2000). Trying to figure out just what was going on, I noticed that Safari was using 66% of my CPU time.

As I closed some tabs, I noticed that my temperature was dropping... fast. In about 20 seconds, the temperature was down to 140-145 Fahrenheit. the fans had slowed as well.

It looks like the problem tab was Verizon Wireless' Chocolate Site. I had clicked the commercial link because I was trying to identify the song. I had paused the movie while I went to some other site to do some searching.

I fired up Quartz Debug, and learned that the entire contents of the HTML document were getting redrawn continuously. That's a lot of pixels to be pushing.

So, if you ever use flash for your website, remember to take it easy on your end user's laps.