one more think in your db.define_table(...) set db.define_table(....,migrate=False) in production. It will also speed things up.
By default you have lots of features up, including sessions. There is lots of room for speed-up. Massimo On Jun 19, 11:21 am, mdipierro <[email protected]> wrote: > I am not sure example is a good test. It was not optimized and does > lots of filesystem IO > > I suggest make a new app, comment everythink in db.py and remove > internationalization in controller/default.py|index > > Then benchmark your app. > > Try un-commenting lines and benchmark again. > > You should also press the button "compile" before running benchmarks > since it will make a difference. > > Massimo > > On Jun 19, 10:01 am, Daniel Guryca <[email protected]> wrote: > > > Hey, thanks. > > > One more question: > > > I can see that performance coming from a default integrated server is > > somewhat poor. > > > I have benchmarked it with apache bench - I mean this included > > page:http://127.0.0.1:8000/examples/default/indexpage. > > > For my dual core AMD @ 2.1Ghz and ab -c 10 -n > > 1000http://127.0.0.1:8000/examples/default/indexI'mgetting 45 requests/s. > > Interesting is that only 1 core is running on 100%. The other core is > > idling. Is an integrated server multi-threaded ? > > > What other deployment possibilities could I test ? > > > Thanks a lot ! > > Daniel > > > On Fri, Jun 19, 2009 at 2:43 PM, mdipierro <[email protected]> wrote: > > > > Hi Daniel, > > > > > 1. > > > > How about custom forms - forms which are independent and are defined > > > > in views but validation just works for them as expected. > > > > Something like this: > > >http://www.wellbehavedsystems.co.uk/web2py/examples/mvc.html > > > > Is it possible ? Does it work in a current version of web2py ? > > > > yes. In controller > > > > def index(): > > > form=SQLFORM(db.table) > > > return dict(form=form) > > > > and in view > > > > {{=form.custom.begin}} > > > <div>{{=form.custom.widget.somefield1}}</div> > > > <div>{{=form.custom.widget.somefield2}}</div> > > > {{=form.custom.submit}} > > > {{=form.custom.end}} > > > > > 2. > > > > Taglibs - is it possible to define my global custom function (with a > > > > specified name space or something similar) with parameters which I can > > > > call in my views ? > > > > Anything defined or imported in model files files is visible in views. > > > You can also import modules explicitly in views {{import ....}} > > > > > 3. > > > > Is it possible to cache only just parts of my views ? You know I would > > > > like to create for example event calendar (using taglib function for > > > > example) then call it in a view and be able to use some build in > > > > web2py caching. > > > > yes. Given any function f you can cache it in views {{=cache.ram > > > ("cache_key",f,5000)}} > > > > > 4. > > > > How about legacy databases. Id name overriding + custom field names > > > > overriding. Is it possible. I do not care this so much but it would be > > > > nice to have these features included. > > > > You can access legacy databases if tables have a unique ID called it. > > > Currently you cannot override table and field names, you must use > > > custom views. This will be possible in the new DAL coming out soon. It > > > is almost done. > > > > > 5. > > > > How about database migrations + independent development and production > > > > modes ? > > > > This is normally done by > > > > production=True > > > if production: db=SQLDB(".. produciton db uri ...") > > > else: db=SQLDB(".. development db uri ...") > > > > web2py will treat migrations separately automatically. > > > > > 6. > > > > Deployment possibilities - apache or java wars with jython ... ? > > > > Since 1.64.2 it works with Jython out of the box (support sqlite and > > > postgresql only). > > > I am building a .war file. Let me know if you want to help testing the > > > war file. > > > Mind that Jython is considerably slower than CPython. > > > > Massimo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

