Log in

No account? Create an account
"Add to Library" hang - brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

"Add to Library" hang [Oct. 15th, 2006|08:21 pm]
Brad Fitzpatrick
[Tags|, , ]

I've never seriously used iTunes, but I try it out every 6 months or so. Ever since iTunes 4.x, importing my music collection (Apple-O, "Add to Library") hangs. It's always some random spot and I then get this modal dialog box titled "Adding Files" with text "Processing: [some random song]" and it's using 99.7% CPU and "Not Responding" according to Activity Monitor, etc.

And then I force quit it, only to find it can't resume where it left off, because apparently it doesn't flush anything to disk while it goes, so you have to restart, basically doing it song by song.


It doesn't even matter if it's local disk or network ... this time I rsync'ed it all to the local disk ~/mp3/ to import, and it still hangs.

Do I have to write my own filesystem -> iTunes importer? Has this been done?

Dear Apple, this is pathetic.

[User Picture]From: jwz
2006-10-16 03:30 am (UTC)
I've never had that happen, and I've bulk-imported my whole library maybe four times... though only with v5, not v6, I think.

Did you blow away everything in {Music,Library}/iTunes/ first? Maybe there's some stale crap in there. Might want to nuke Library/Preferences/com.apple.iTunes* too.

You can drag directories from Finder onto iTunes to import, too, so if it's still stalling, at least you can do a hundred albums a time or something, so you have to backtrack less far to restart.

Try turning off volume adjustment and other stuff that will cause it to analyse the MP3 files as its importing. It'll do that stuff later as needed once you have it all imported.
(Reply) (Thread)
(Deleted comment)
[User Picture]From: brad
2006-10-16 03:47 am (UTC)
No. It's not reproducible. It's not tied to a certain file:

-- when I see where it hangs, I can redo that directory alone and it works. or the directories around it, including it, just to make sure the error wasn't out of sync with the UI.

-- I can do it chunks of 20 directories at a time and it succeeds.

It's just that when the import set gets too big, it hangs.

Like maybe the SQLite transaction is getting too big and it starts to spin instead. Who knows.
(Reply) (Parent) (Thread)
(Deleted comment)
[User Picture]From: brad
2006-10-16 06:27 am (UTC)
4865, and a bunch of m3u files, if that trips it up (and it might).
(Reply) (Parent) (Thread)
[User Picture]From: zind4gi
2006-10-16 03:55 am (UTC)
If you don't want to use iTunes there are several other freeware and shareware tools that let you copy over MP3s to your iPOD and vice versa. YamiPod is one of them

(Reply) (Thread)
[User Picture]From: brad
2006-10-16 04:32 am (UTC)
Thanks for the link!
(Reply) (Parent) (Thread)
[User Picture]From: anildash
2006-10-16 05:30 am (UTC)
yamipod works pretty well... i have it running on my ubuntu machine at home and it doesn't choke even though i primarily sync that ipod with itunes on another machine. (which is itunes/windows)

how big is your music library in total?

(Reply) (Parent) (Thread)
[User Picture]From: crackmonkey
2006-10-16 04:04 am (UTC)
Do you have an Intel mac? Is "translate" running?

For some strange voodoo reason, translate would kick on and iTunes would magically drag to a halt. Still no solution known, but killing it helped. Also, importing over SMB sucks, but I assume you know that.
(Reply) (Thread)
[User Picture]From: moonwick
2006-10-16 04:45 am (UTC)
It's probably choking on all of that Culture Club you've got.
(Reply) (Thread)
From: kfringe
2006-10-16 05:15 am (UTC)
A couple of questions:

Is iTunes recopying these files into its own directory structure? (Are preferences/advanced/general/"Keep iTunes Music folder organized" and "Copy files to itunes Music folder" checked?)

If yes to the above, is your disk still thrashing while iTunes is hung?

I've imported my collection (~1800 cds worth of lossless) into iTunes several times with both options checked. That dialog box is fairly familiar, but iTunes' lack of responsiveness is a lie. iTunes usually crunches though. You're on a tight schedule, though, so you might want to make a change.

Due to your pre-flight time constraints, you might want to un-check both of those boxes before adding any large quantity of music. You'll still see iTunes appear to hang for a while, but it should be fine by the time you come back from picking up a six pack of beer.

(Reply) (Thread)
[User Picture]From: brad
2006-10-16 06:29 am (UTC)
"Organize", yes. "Copy", no.

I didn't have space for iTunes to copy everything to its own folder, as my disk had less free space than the size of my source ~/mp3/ directory I'd rsync'd over.

In any case, I got it all now, it was just tedious.
(Reply) (Parent) (Thread)
[User Picture]From: thaumata
2006-10-16 05:33 am (UTC)
I had a lot of trouble filling my ipod when I got it. It took all my music but didn't take any of my playlists, and I didn't realize it until I was half a world away and looking for my Spanish lessons.

I work at Splicemusic.com - I know lots of audio guys. We talk a lot about different ways to apply fingerprinting. Let me know if you need more help and I'll find someone who knows more than me. :)
(Reply) (Thread)