Why is Core Data save slow?

I am writing a Mac app using Core Data. I have a model set up with 10 Entities and a number of relationships. Four of the entities will hold 99% of the records. It works great. I wanted to do some performance testing, so wrote code to populate the database with 82,000 managed objects in one of the entities. The others have less with the second highest containing 33,000.

The issue I have is that after populating the database and having saved, then when I call the [context save] method every time thereafter, the save takes over 10 seconds, even if I have modified only one attribute in one object. Why is this?The database is about 45MB in total size. It seems like Core Data is saving the whole database instead of just updating the one object.

OMG, I can't believe the default store type was set to XML! Just changed it to SQLite and regenerating the database. Of course, using XML the whole database is written for every save.

Why is Core Data save slow?
 
 
Q