Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse.com - saveAll on PFObject does it account for 1 API call?

I have an IOS app and I want to make sure I minimally use the API request to parse.com due to the 30/sec request limitation on the free tier. Could some one please clarify if saving disparate PFObjects in one method call "[PFObject saveAll:NSArray]" amounts to 1 API call or multiple API calls.

I need a definite answer since there is no clear answer anywhere on the interwebs. Parse.com support please help since I want to code the implementation differently if it accounts for many API requests in which case I will make sure I have better error handling when I save each pfObject separately.

Thanks.

like image 946
user2733554 Avatar asked Dec 01 '22 15:12

user2733554


2 Answers

From Parse:

saveAll attempts to do as few API calls as possible. Usually a call to saveAll results in only one API request. However, if any of the objects in the set has a relation to another unsaved object, that object will have to be saved first, resulting in more API requests.

https://www.parse.com/questions/saveall-how-many-api-requests

like image 82
Michael Peterson Avatar answered Dec 16 '22 01:12

Michael Peterson


I'm using PFObject saveAllInBackground:block and regardless if there's a relation to another unsaved object, my api count in Analytics always increases by the number of objects in the array.

like image 35
Feta Avatar answered Dec 16 '22 01:12

Feta