Google Datastore w/ JDO: Access Times?
- by Bosh
I'm hitting what appears (to me) strange behavior when I pull data from the google datastore over JDO. In particular, the query executes quickly (say 100 ms), but finding the size of the resulting List< takes about one second! Indeed, whatever operation I try to perform on the resulting list takes about a second. Has anybody seen this behavior? Is it expected? Unusual? Any way around it?
PersistenceManager pm = PMF.getPersistenceManager();
Query q = pm.newQuery("select from " + Person.class.getName() +" order by key limit 1000 ");
System.out.println("getting all at " + System.currentTimeMillis());
mcs = (List<Med>) q.execute();
System.out.println("got all at " + System.currentTimeMillis());
int size = mcs.size();
System.out.println("size was " + size + " at " + System.currentTimeMillis());
getting all at 1271549139441
got all at 1271549139578
size was 850 at 1271549141071
-B