jessesquires / JSQCoreDataKit

A swifter Core Data stack
https://jessesquires.github.io/JSQCoreDataKit/
MIT License
614 stars 69 forks source link

Testing notes #257

Open jessesquires opened 1 year ago

jessesquires commented 1 year ago

https://mjtsai.com/blog/2023/05/30/building-large-scale-apps-with-swiftui/

I do not recommend testing Core Data with NSInMemoryStoreType because a lot of features don’t work with it, the performance characteristics are skewed, and having an actual file helps track down memory management bugs. I find that, with modern SSDs, using NSSQLiteStoreType with a temporary folder is fine, and there are various pragmas to make it go faster. If you really need in-memory, use /dev/null/DatabaseName as the file path.