Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting large amount of objects at once sometimes fail #281

Closed
jphribovsek opened this issue May 30, 2014 · 3 comments
Closed

Deleting large amount of objects at once sometimes fail #281

jphribovsek opened this issue May 30, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@jphribovsek
Copy link

We have an entity with couple of NSString/NSNumbers attributes, small objects.
Users can have a large number of those objects, in this case 10,000.
There is an option for users to do a "clear all" and remove all objects at once.
The clear all method loops through all objects in core data and performs a deleteObject: for each of them, then a single save when the loop is over.

  • the operation takes a long time to sync, delete one at a time on the server
  • the operation eventually stops. So even though the device shows 0 items (all removed from core data), a few thousands items remain on the server, and devices get out of sync. The operation never resumes.
@jleandroperez
Copy link
Contributor

This is caused by #228

@jphribovsek
Copy link
Author

In addition to that, the main thread is blocked when performing large bulk delete, it's causing major performance issues.
screen shot 2014-06-23 at 11 11 41 am

@jleandroperez jleandroperez changed the title deleting large amount of objects at once sometimes fail Deleting large amount of objects at once sometimes fail Jun 30, 2014
@jleandroperez
Copy link
Contributor

Let's handle the performance issue in #274.

This fix should not happen anymore (Ref. #228 is fixed, thanks JP!). Plus, now the error handling mechanism has been patched not-to-fail when dealing with deletions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants