nofelmahmood / Seam

Seamless CloudKit Sync with CoreData
https://medium.com/@Nofel/reason-why-cloudkit-cannot-be-ignored-9c7806d76230
MIT License
669 stars 64 forks source link

Taking CoreData operations off main thread #47

Open saraseif opened 6 years ago

saraseif commented 6 years ago

Hello guys!

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:

Class:StoreRelationshipTests function:testAddingTagToAlreadyAddedTask is calling deleteAll which is doing database operations.

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