How to resolve “internal table overflow”?

When attempting to load the iTunes XML/plist file, I get “internal table overflow.” After Googling, it looks like Applescript has run out of memory. The file is 18 meg on disk, so while on the larger side of things, it should still work on a Mac with 2 gigs.

How can I resolve this?

Obviously, since it’s created by iTunes, I can’t do much to change the creation of file (i.e., split it into smaller files).

Here’s a snippet of my code:

tell application "System Events"
    tell property list file (itunes_xml_file as string)
        tell contents
            set my_tracks to value of property list item "Tracks"
            repeat with t in items of my_tracks
            ...

I’m pretty new to Applescript, so I could be doing something obviously stupid.

Hi. What are you actually trying to do”get track names?

Track names, but also track artist, album & rating.

Why not asking iTunes directly? Using the dictionary of iTunes is probably faster than parsing the xml file with System Events

I agree with Stefan. It’s much easier to obtain this info using iTunes, directly.

tell application "iTunes" to tracks's {name, artist, album, rating}

Well, in a way I am. But what I’m trying to do is take the XML file from another computer and update the local instance of iTunes.