google app engine - Objectify async: at what point RPC call is made? -


quite want make 2 or more independent queries fetch entities datastore. i'm not sure if parallel. example:

loadresult1 = ofy().load().key(key.create(foo.class, 1)); loadresult2 = ofy().load().key(key.create(bar.class, 1));  loadresult1.now(); loadresult2.now(); 

is there benefit of arranging code this?

same goes search queries

iterable1 = ofy().load().type(foo.class).iterable(); iterable2 = ofy().load().type(bar.class).iterable();  iterable1.hasnext(); iterable2.hasnext(); 

will iterable2 load in parallel iterable1?

side question: .iterable() in regard different .list()?

i tried debug code, doesn't call made until call .now(), or first call .next()/.hasnext() in. so?

yes - until materialize result, queries proceed asynchronously in parallel.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -