Parse.com - is saveAll on PFObject responsible for 1 API call?

I have an iOS app and I want to make sure that I use the API request at parse.com minimally due to a 30 second free level restriction. Can someone explain if the disproportionate PFObjects are saved in one call to the method [PFObject saveAll: NSArray] consists of 1 API call or several API calls.

I need a specific answer because there is no clear answer anywhere in interwebs. Parse.com support, please help, since I want to code the implementation differently if it takes into account many API requests, in which case I will be sure that I have improved error handling when I save each pfObject separately.

Thanks.

+5
source share
5 answers

From what I saw using Parse, storing many PFObjects accounts as 1 API call.

However, what I do not know about is that if there are any restrictions on the number of objects that will be saved immediately and will still be considered as 1 API call.

I also recommend that you test it yourself. Try to save several objects at once and see how your API causes a change in the number in the control panel.

Please note that batch operations will not be performed in general if one object does not work (for example, the object does not exist).

+1
source

From Parse:

saveAll tries to make as few API calls as possible. Typically, calling saveAll results in only one API request. However, if any of the objects in the set is related to another unsaved object, this object must be saved first, which will lead to more API requests.

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

+6
source

I use PFObject saveAllInBackground: block and regardless of whether there is a relation to another unsaved object, my analytics api counter always increases by the number of objects in the array.

+5
source

With Parse moving to a new pricing model, they also changed the way they count batch processing requests (for example, saveAll ):

If earlier batch requests were considered the only request, now it accepts requests n (where n is the number of objects transferred to saveAll ).

There was an extension of the old counting method for applications that already depended on it, but as of February 2015, batch operations, such as saveAll , use 1 request per object

+5
source

For me, saveAll also uses as many API calls as many objects are saved. I think that they changed it with a new price, and it does not make sense, because one user who saves several data immediately generates a crazy peak of Api consumption.

+1
source

Source: https://habr.com/ru/post/1201928/


All Articles