I have seen many complaints of a problem that has become somewhat commonplace in iTunes. I work for a major Technical Support company and get customer complaints about this often. It is frustrating because I generally am good at solving issues. Now I have a solution and I wish to share it with everyone.
The issue is whenever you open iTunes it begins "Analyzing Gapless Playback" for a certain number of songs. In my case I have discovered that once this issue begins happening...every single song you add to iTunes thereafter will be added to the list of songs that need to be analyzed. I had this issue in Lion and Mountain Lion. But I have heard lots of people have the same issue with previous versions of OS X.
The Cause (hypothisis)
My hypothesis is that the problem is that iTunes loses the ability to physically write the ID3 tag information. When you make changes to files the changes are saved in your iTunes library files but nowhere else. Because iTunes detects the ID3 tags untouched when it opens it assumes that they have not yet been checked for gapless playback thus performs the check. The problem lies in permissions. Some change you make (OS Upgrade, Reinstall, etc) cause the permissions in the folder to not allow iTunes to write the ID3 tags. I have tried everything I could think of to fix this and was unable to do so. I tried using MP3 repair programs (MP3 Scan & Repair.app)
I have tried a lot of different things to fix this and the only thing I figured out is kind of a "catch all" but it works none the less. I want to preface this with saying this is kind of an extreme pain the neck thing to do but it fixed my issue. In my iTunes preferences I have enabled Keep iTunes Media Folder Organized and Copy Files to iTunes Media Folder. This is how I have always kept my iTunes. These instructions are assuming that is also what you are doing.
- Quit iTunes
- Navigate to your Music Folder
- Move all of the highlighted items in the photo below to a new folder on your desktop.
4. Now launch iTunes. When it opens it will appear like the first time you opened iTunes because (duh) there is no media in it yet.
5. Go into Preferences (advanced) and make sure your iTunes Media Folder is set correctly.
6. Make sure that iTunes Match is turned off for now.
7. Click File>Add to Library and then choose your iTunes Media Folder. You will then wait for a long time (most likely) while your media is rescanned.
At this point (if you organize your iTunes with precision like I do) you are going to find your iTunes Library with a little bit of disorganization (depending on how long the issue had been going on). Because iTunes had not been able to write to your ID3 tags many corrections you may have made over the past couple of months (however long the issue had been going on) will not be in effect. For me it wasn't so bad. I had about 200 songs & books that I needed to fix. Audiobooks seem to be more of a problem for me.
So go through and get your iTunes Library back to the way you like it. Then turn on iTunes Match (if you have it). The reason we had it off was to make sure that your match data didn't get replaced with your iTunes Library mistakes not re-fixed.
I have restarted my Mac many times and it has been about a day since I did this and everything appears to be working correctly.
I wish I had something to write in this area but I have no clue how to prevent this from happening again. If I figure out a way I will be sure to edit this article. I am open for suggestions!