Further to the discussion on the following thread, today i have decided to
test the performance of web2py on app engine
http://groups.google.com/group/web2py/browse_thread/thread/e04dd277360d28b4?hl=en

Disclaimer: My only Intention of these tests is to measure the performance &
if possible contribute to improve web2py framework. Any constructive
criticism is always welcome. Also pls note that I am new to all
three(python, web2py & gae). But I have tried my best to do it in the right
way ( I mean python way ;) )

*Case 1: Simple insert record test*

Model:
db.define_table("Team",
     SQLField("name", "string"))

Controller:
def new():
    team_form=SQLFORM(db.Team, _method="get")
    team_form.accepts(request.vars, formname='default')
    return dict(Create_new_team=team_form)

Test has been performed using urlfetch as follows
import urllib2
for i in range(0, 100):
    url = "
http://4.latest.myapplication.appspot.com/init/team/new?name=australia&_formname=default
"
    page = urllib2.urlopen(url)
    print "Completed %s creation" % i

*Here's my results*
*1st run*: insertion of 100 records
http requests: 100
time: 102.669 sec
time/request : 1.02669 sec
Datastore api calls: 200

*2nd run*: insertion of 100 more records
http requests: 100
time: 81.934 sec
time/request : 0.81934 sec
Datastore api calls: 200

Not sure why datastore api calls are made twice for each request. Need to
investigate further. If anyone has any further information on this pls do
share it in this thread.

Coudnt do a update test using following method

def edit():
    team=db(db.Team.id==request.args[0]).select()[0]
    team_form=SQLFORM(db.Team, team, _method="get")
    team_form.accepts(request.vars, formname="default")
    return dict(Update_team=team_form)

as web2py throws

*SyntaxError: user is tampering with form*

Any suggestion how to hack it without modifying web2py source?
Anybody else out there interested in web2py performance on gae?


Thanks,
Sudhakar.M

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to