Parse.com - saveAll on PFObject does it account fo

2019-01-26 15:01发布

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.

标签: ios parse.com
5条回答
\"骚年 ilove
2楼-- · 2019-01-26 15:50

For me saveAll is also using as many API calls as objects are saved. I think they changed this with the new pricing and this is a non-sense, since one user saving multiple data at once generates an insane peak on the Api consumption.

查看更多
Summer. ? 凉城
3楼-- · 2019-01-26 15:52

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

查看更多
唯我独甜
4楼-- · 2019-01-26 15:54

With Parse moving to the new pricing model they also changed the way batch operation requests (e.g. saveAll) are counted:

Where previously batch requests counted as a single request, it now takes n requests (where n is the number of objects passed to saveAll).

There was a extension of the old way of counting for apps that were already depending on it, but as of February 2015 batch operations like saveAll use 1 request per object

查看更多
做个烂人
5楼-- · 2019-01-26 15:57

From what I have seen using Parse, saving many PFObjects accounts as 1 API call.

However, the thing I don't know about is that if there are any limits on the number of objects to be saved at once and still be considered as 1 API call.

Also I recommend that you test it yourself. Try saving multiple objects at once and see how your API calls number change in the dashboard.

Please note that batch operations will fail as a whole if one object fails (e.g. object does not exist).

查看更多
手持菜刀,她持情操
6楼-- · 2019-01-26 16:08

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.

查看更多
登录 后发表回答