Something strange with the performance of the AppEngine Datastore. I tried to run the following code:
from google.appengine.ext import db from time import time print 'Content-Type: text/plain' print '' total_t=time() class C(db.Model): i=db.IntegerProperty() for i in range(10): t=time() for j in range(10): c=C(i=i) c.save() print time()-t print "total time:", time()-total_t
0.307200908661 0.279258012772 0.305376052856 0.310864925385 0.286242008209 0.283288002014 0.299383878708 0.286517858505 0.281584024429 0.268044948578 total time: 2.90873217583
I tried to add 200 records, and got a time-out as AppEngine does not allow long-running queries. I had pretty similar timings on the dev_appserver. This is very slow, and I cannot understand where is the catch.