I have two classes. The first class contains a reference to the second. One service request might generate several such pairs. So I figured that I can batch store them at the end of the service request. To do that I need to generate ID-s for all the second classes. I thought that allocateIds was what I needed but from the tests I made (it sometimes took much longer to execute than other times) I suspected that it sometimes goes to the datastore. Ideally I would like to avoid going to the datastore just to generate the Id-s. What is the best way to accomplish this?
To answer Your second question I haven't had time to play with AppStats yet. I measured time using System.nanoTime(). Thanks for Your time. On Oct 1, 10:59 pm, "Ikai Lan (Google)" <[email protected]> wrote: > They're a function of the datastore itself, but they don't create indexes or > any of the things that are usually associated with entity writes. The worst > case performance has allocateIds doing a write to a hard disk, but most of > the time they retrieve data from in-memory caches. > > What are you trying to do? Have you benchmarked this using AppStats? > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > Blogger:http://googleappengine.blogspot.com > Reddit:http://www.reddit.com/r/appengine > Twitter:http://twitter.com/app_engine > > On Tue, Sep 28, 2010 at 4:19 AM, dilbert <[email protected]> wrote: > > How fast are the allocateIds methods from the DatastoreService > > interface? I mean do they hit the datastore? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-appengine-java%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
