Expensive Rendering, or How to make your MacBook fan scream

August 16, 2016 - By

Recently I made a dangerous wager with a colleague: If he could show up to work on time 10 times in a row I would actually consider getting a motorcycle. 24 hours later my Mac was hot enough to fry bacon on.

This dangerous game turned out to be a safe bet; the very next day my coworker was over 100 minutes late. Leading up to the start of core-hours was a countdown on our Chromecast from this URL.

Screen Shot 2016-08-23 at 14.18.42.png

I busted the tab out of my Chrome so I could resize it to 1920×1080 for the sake of filling the Chromecast screen, and minimized the tab. When the countdown got to zero the confetti started to fly! I wanted Latey McTardyson to see the countdown, so I left the tab open. And forgot about it!

It wasn’t long before I started having some problems. First it was the noise. My fan started roaring to the point where neighbouring workstations were noticing. Then the heat. I quickly discovered that it was Chrome eating up all the resources. Clumsily, I hit ⌘+~ to see other Chrome windows, but the minimized one stayed hidden. I started closing all my regularly pinned tabs, but couldn’t find the culprit for an embarrassingly long time.

In that time Dr. Perpetually-late showed up and we played with the site a bit. Using iStat Menus we were able to see the kind of work this open tab was putting the computer through! We did see a CPU Core pass 100 degrees:

Screen Shot 2016-08-23 at 14.59.39.png

Compare the iStat reports; left being with the tab, and right being without it in a cooled down state.

I’ve seen this before: the SVG animation is very expensive I suppose. I suspect it could be helped by getting the GPU to help with rendering, or making each circle in the SVG extend from a def. I didn’t get far in troubleshooting this, as a user I was being a bit edge-casey; this isn’t a “problem” that warrants solving. Time and Date is a useful site, so let me just say they didn’t really do anything wrong. Things could be optimized, but it’s probably not worth the time. It’s not surprising that this wasn’t tested at being left open a couple hours.

One last note; if you start playing with iStat maybe you should also check out the particle player built into Google Play Music too:

upload.png

Categorized in:

This post was written by ArleyM