News for hackers. Stuff that matters.
Re:A taste of CoreData – A graph framework by RantyDave on Tuesday February 20, 2018 @06:47AM (#16419643)
NSPredicate. Back in the day I fought through the CoreData only kinda SQL thing and eventually got a result but... These days I'd just shove it on SQLite and get 10x the performance for 10x less effort. God DAMN that was hard work.

https://developer.apple.com/library/content/documentation/Co...

Re:A taste of CoreData – A graph framework by danieleggert on Tuesday February 20, 2018 @08:20AM (#16420066)
Well, that’s a common misconception, but far from the truth. If you actually care about performance, you’ll soon find out that performance wrt. database work is all about high-level optimizations: You want to reduce the times you hit the database (both reads and particularly writes).

And once you’re getting into that busyness, Core Data will allow you to create way faster coder in less time. Core Data will get you 10x the performance for 10x less effort.

Re:A taste of CoreData – A graph framework by mpweiher on Tuesday February 20, 2018 @09:18AM (#16420426)
Hmm...parent is actually correct. What you write is true with very slow databases, particularly when talking to enterprise databases over a network.

"Fortunately", CoreData is so slow that as long as you stay within that universe, your view will never be invalidated.

Outside, however, computers are blazingly fast in general and I/O throughput is also incredibly fast. My laptop can read/write 2 GB/s. That's a lot. Moby Dick is around 1.25 MB. This means that you can write this whale of a book, in its entirety, 800 times per second. That's a lot. But I repeat myself...because it's worth repeating.

CoreData helps you optimize/minimize the size of transactions. Except for a very few cases, that's the wrong thing to optimize, as all our storage has amazing throughput and not-so good per-transaction and seek costs. Getting 1 byte from disk is almost as expensive as getting 1 megabyte, and having a bunch of smaller transactions is almost always a loss compared to one large transaction.