Major Performance Improvements

So I had an itch to do some performance optimization at WWDC after watching the Core Data Performance session and here's the result. On my sample test App.net dataset I'm seeing performance improvements from the following sample sizes.

1000 records: 300ms
10000 records: 3s
100000 records: 30s

Those are fairly complex records which have multiple relationships and populate multiple attributes per relationship entity. It's a significant performance improvement just with a few basic algorithmic changes.

Part of this pulls in Luke's (cc @urbanappetite) changes from the other pull request. That pull request is now closed. Part of it is changes I made at WWDC.

The changes represent mainly 3 issues:
1) Duplication of proto records in the primary proto records array (the list of objects that get populated).
2) Duplication of relationship protos, resulting in excessive computation
3) Not setting fetchBatchSize and losing the opportunity for some free performance gains when using SQLite stores.

My apologies about the prior pull request that was fairly messy. I also added a new Performance tuning project to the Examples directory and the MMRecord workspace. That project has now been committed to Master and is no longer part of this pull request.

As an aside, I have a lot of thoughts on some more advancements we can make here to support huge batch imports that I thought of during some of the WWDC talks and labs. More to come on that later.

cc @blakewatters

Thanks,

Conrad