2004/09/09

2004 09 09

Base | Lab | iTunes

09:35

Avoid very large playlists

A while ago, I had intermittent but persistent problems with iTunes (on WinXP) maxing out the CPU to the point where the music would start skipping playback.

At first (as I recorded here) I thought the issue was with a USB vs FireWire connection to the external drive on which the music files are stored. Using USB instead of the FireWire surely made the problem worse, as did the fact that the file system was severely fragmented.

So, I defragmented the drive and things were better--but not over just yet.

Really by coincidence, I found out what the actual culprit must have been: automatic playlists that have around 8000 songs each (largely overlapping, off course).

I had about a dozen of those lists and they used the 'Last played' data as a criterium. In effect, after every song, each of those lists would have to be updated. The process of updating involves (from what I can tell from file movements and memory usage) building a catalog of songs in memory, wich then get written to temporary files, which then, in turn, get written out to the XML file in the iTunes directory.

Open that file (or a copy thereof) in your favourite text editor some time. You will find that not just the 'recipe' for your automatic playlists is listed, but also a list of the the actual songs that make up the list. Not very elegant, I agree.

I removed the playlists (they were a mere byproduct of playing around with iTunes anyway) and my CPU maxing problems disappeared.