-
-
Notifications
You must be signed in to change notification settings - Fork 878
iOS: Object Pinning takes too much time #318
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
Labels
state:duplicate
Duplicate of already reported issue
Comments
Ohh, so if my rows in a table is 10k then will it increase time to pin an object? |
Yup. We have a somewhat linear dependency on number of objects in a pin, so yes - 10k objects will slow things down. |
How much time it will take to pin an object if i have 10k rows in a customer table with 2 pointers and 5 string fields? |
Hope this fixes in 1.9.0 else i will have to drop parse. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Below is the simple code i have, after few hundreds of pinned objects, new object take more than 12 seconds to pin.
-(void)saveToparse{
PFQuery query= [PFQuery queryWithClassName:@"register"];
[query fromPinWithName:self.registerId];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (objects.count==1) {
PFObject *object = [objects objectAtIndex:0];
[self setvalue:object];
[object saveEventually];
[object pinInBackgroundWithName:self.registerId];
}
else{
PFObject object = [PFObject objectWithClassName:@"register"];
[self setvalue:object];
[object saveEventually];
[object pinInBackgroundWithName:self.registerId];
}
}
];
}
-(void)setvalue:(PFObject *)object{
[object setObject:self.registerId forKey:@"register_id"];
[object setObject:[NSNumber numberWithFloat:self.amountIn] forKey:@"field1"];
[object setObject:[NSNumber numberWithFloat:self.amountOut] forKey:@"field2"];
[object setObject:[NSNumber numberWithInt:self.transactionType] forKey:@"trans_type"];
[object setObject:[NSNumber numberWithFloat:self.total] forKey:@"total"];
[object setObject:self.date forKey:@"date"];
[object setObject:self.username forKey:@"username"];
}
The text was updated successfully, but these errors were encountered: