modo-studio / SugarRecord

CoreData/Realm sweet wrapper written in Swift
MIT License
2.11k stars 223 forks source link

Taking CoreData operations off main thread #348

Open saraseif opened 6 years ago

saraseif commented 6 years ago

Hello guys!

What

According to best practices, it is better to do Coredata related operations in the background, not to cause any possible performance drops, or UI blocks

I feel like you are doing some database access in the main thread:

Context

Class: CoreDataObservable, function:observe, and Class:CoreDataDefaultStorageTests function:spec, both calling fetch which is doing database operations

Proposal

Don't you think it would be better to take these operations off the main thread?