简体   繁体   中英

how does “ofy().save().entities( )” and “ofy().save().entitiy()” in Objectify works

I want to know how does ofy().save().entities() is differ from ofy().save().entity() .

I know that the ofy().save().entities() will save multiple entites when ofy().save().entity() will save only the given entity.

My doubt is what will be the different to store 10 entities with ofy().save().entity() using 10 times and saving all 10 entites with ofy().save().entities() at once.

  1. What would be the write operation for both operations?
  2. how the iteration will be happen?
  3. how long it will take ?

Thanks in Advance. I am very beginner to this. please help me.

Billed write operations are per-entity and will be the same either way.

Calling multiple separate save() operations will take significantly longer than a single batch save() because it incurs the latency of a separate RPC request each time. Always prefer batch operations if you can.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM