in principle 2) is always faster. If the effect is measurable I cannot say, depends on the controller logic.
On Saturday, 8 December 2012 01:43:55 UTC-6, mweissen wrote: > > About performance: > > Is it better > (1) to have only few controllers with a lot of functions in it or > (2) to have a lot of controllers with only few functions or > (3) is there - from the point of view of performance - no difference? > > 2012/12/7 Massimo Di Pierro <[email protected] <javascript:>> > >> Hello dbv, >> >> about nginx we will add something to the book but meanwhile we provide >> two setup scrpts: >> >> >> https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh >> >> https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-on-centos.sh >> >> About gevent you can do: >> >> python anyserver.py -h >> python anyserver.py -s gevent >> >> anyserver.py comes with web2py. >> >> You cannot turn off features but since 2.2.x many of the features are >> lazy therefore off by default if unused. Specifically session and cache do >> not add overhead. there is still a small overhead in validating client ip, >> accept-language, and parsing the request environment. >> >> You can move your models in a subfolder so they are only executed for a >> controller with the same name as the subfolder. >> >> Massimo >> >> >> On Friday, 7 December 2012 12:50:11 UTC-6, dbv wrote: >>> >>> We are considering using web2py because it offers strong access control >>> and user session management. >>> >>> Our first application is not database-heavy and so db issues are not an >>> issue. Performance is important but should be fine with Nginx: >>> >>> a. Why isn't Nginx configuration included in the web2py book? Lighttpd >>> is included but their code hasn't been updated in nearly two years. >>> >>> For our 2nd application, performance is important: >>> >>> b. Is gevent supported in web2py with monkey-patching? If so, is there >>> a reference to it? >>> c. Is it possible to turn off the things that make web2py slower eg. >>> session management, db etc. to provide a 'raw' web2py (+ gevent + nginx) >>> whose only purpose is to take http requests and return data ie. no session >>> management, access control or db access? >>> >>> -- >> > --

