Why does my iTunes use so much CPU time?

10

I have a roughly 2 year old Macbook (10.5). I have iTunes 10.

When iTunes is playing MP3s, I see CPU usage of the iTunes process in the system monitor ranging from 65%-75%. When I pause the music, I see CPU usage of about 65%-75%.

I do not have any visualisations going, to my knowledge I have not turned on any CPU destroying features, my music library isn't tiny, but it's hardly huge (3GB). This is mildly annoying when I'm plugged into the wall as I only have slightly longer compile times, but if I am out and about, this is a major drain on the battery.

Using VLC I see CPU loads of ~= 10% at the most when listening to music and generally lower.

What the heck is iTunes doing?

bikesandcode

Posted 2010-12-01T19:11:26.103

Reputation: 375

I've often asked myself that question! Do you have a lot of Smart Playlists? Those are supposedly CPU hogs (though given the event-driven nature of cocoa I'm not sure why that would be). What you might do is start Spin Control (from the Developer Tools package) and sample iTunes when it hangs, which should be often, and take a peek at what it's doing. As an aside, I'm currently importing a CD with error correction AND playing the already-imported files AND importing (restoring from backup) iTunes Store TV shows and I'm only at 36% CPU usage. – msanford – 2010-12-01T20:24:37.033

I'm fairly certain that I'm not using smart playlists. I'm a pretty unsophisticated iTunes user. I tend to listen to full albums so I use the 'sort by album' view, click on a random song and go linearly down the albums from there. That's basically 100% of my use cases. – bikesandcode – 2010-12-02T01:29:57.753

Doing some testing to confirm and I will put an official answer here if I've got it (and file a bug), but it appears that rendering the album cover is the culprit. (most of mine have the covers, so it looked like it was all the time). I just noticed that in the middle of my playlist CPU usage dropped. Literally, scroll up in the list 4 songs, CPU -> 65%. Scroll down the list, touching nothing else, CPU -> 5%. Awesome. – bikesandcode – 2010-12-03T01:00:07.957

One word: Apple. – Sliq – 2013-03-21T00:53:30.323

Answers

1

Here are some guesses:

  • Indexing metadata about your music
  • Pre-decoding next tracks in your playlist for smoother transition from song to song, such as gapless playback or crossfading
    • Did you recently enable gapless playback, and perhaps it is analyzing tracks for this?
  • A bug

I'm seeing 0.0% load for a paused iTunes 10.6 64-bit on OS X 10.7 Lion.

Since you're using Leopard (OS X 10.5), maybe it's a Leopard-specific bug?

Sorry I don't have a concrete answer- it's a very complex thing, finding out what might be causing one person's Macbook to have issues running iTunes on an older version of the OS. Best of luck, though!

Eric Goldberg

Posted 2010-12-01T19:11:26.103

Reputation: 111

-2

It should only be using that CPU time when you're syncing your iPhone/iPod or when you're ripping a CD. There are also other CPU consuming tasks but those two are the most common.

When ripping a CD, obviously you're doing a lot of number crunching and encoding.

When syncing iPods, sometimes you're scaling down hundreds of pictures, because a 3MB or a 500kB picture looks the same in your iPod/iPhone (at least iPhone 3GS/3G), thus they scale the photo down so that you don't waste space.

Other than that they also optimize your music if you tick the option to use 128kb AAC, which I recommend because I can't hear the difference between 128kb AAC and 196kb MP3 and it will save you quite a lot of spaces.

Hopefully this answers your question.

Enrico Susatyo

Posted 2010-12-01T19:11:26.103

Reputation: 2 928

Please read the question before posting an answer. – rakslice – 2017-06-09T10:19:48.293

-1 Why is this answer relevant at all? He's complaining about the level of CPU use when the system should be quiescent. No playing, no encoding, just sitting there minimized. (I've hooked up a debugger and I see the cost spent on redrawing the screen. With no visible windows and nothing animated when the iTunes window is open. WTF! For the record, audio playback takes about 1% of a CPU core…) – Donal Fellows – 2012-03-20T15:02:13.383