When I started ReceiptWallet almost a year ago, I chose to use the XML format for my CoreData stores. This was mainly because I was unsure of CoreData and if I messed something up, I could look at the file in a text editor and change it. Except for the first few weeks developing, I’ve only touched the data file once for a customer where CoreData improperly encoded an entity and made the XML invalid.
Last week I decided to try the Binary format (I put code in awhile ago to try Binary, XML, or SQLite). Wow, the startup time dropped as CoreData no longer had to parse the XML. Next I tried SQLite and again, it appeared to be a bit faster. So, I’ve decided to make SQLite the default database format for ReceiptWallet and DocumentWallet (it can be changed with a plist change). The only downside to SQLite vs XML and Binary is that an SQLite file can’t be opened by two users at once, so I added a preference that allows the user to share the database (everyone except the primary user has to view it as read only) which changes the database format to Binary if it was SQLite.
So, I’m crossing my fingers that I don’t run into any problems with SQLite; lots of programs use it, so I should be OK. I did have a bug where I used an NSPredicate with “MATCHES” in it where I should have used “LIKE” which failed with the SQLite store. I’m not sure why that worked in the other database formats, but it did.