uhm. of course you have pyc files, but that's not what I meant. I meant hitting "compile" on the admin app. If you have an application/yourapp/compiled folder, then you have it compiled the way I meant.
On Wednesday, June 12, 2013 7:32:30 PM UTC+2, Matt wrote: > > I thought I had precompiled my app, in this sense does "precompile" the > app mean generating pyc's for all the relevant models? In that case, yes > that was done. I haven't messed with conditional ones at all so far. It > should also be mentioned that I experience the same response times when > running from rocket as well as nginx+uwsgi. > > Matt > > On Wednesday, June 12, 2013 11:04:48 AM UTC-4, Niphlod wrote: >> >> given that you can pre-compile your app, did you test if the compilation >> time drops before moving around your models to use conditional ones ? >> >> On Wednesday, June 12, 2013 3:47:47 PM UTC+2, Matt wrote: >>> >>> Hi, >>> We use web2py somewhat differently than most use cases in that we aren't >>> using a database at all, but instead back our web2py app with connections >>> to a server over a local unix RPC socket. We still use web2py to perform >>> validations, and UI generation, so we have a bunch of models that basically >>> contain gluon Field's, and then either call SQLFORM on that model's fields >>> or serialize that model and send it over the wire. More specifically, we >>> have a number of controllers that correspond to a model >>> (controllers/foo.py, and a model/foo.py that we can call SQLFORM on to >>> generate a form), and then we have a single rest.py controller that >>> provides a rest interface to the rpc socket (rest.py basically mirrors all >>> of the controllers with methods defined as: @request.restful(), validates >>> the data using the correct "model", and communicates over the rpc socket) >>> >>> I've been doing a number of benchmarks recently, and found that while it >>> generally takes ~3.5ms to receive a response over the unix domain socket, >>> calls to the web2py rest controller are taking somewhere around ~80-90ms to >>> return. My suspicion is that this is because web2py is compiling all of the >>> models for every request (running web2py with the profiler seems to >>> corroborate this, indicating that most of the time spent in the response is >>> in compileapp). From my reading it also seems that we can reduce the >>> compilation time of compileapp by using conditional models, however the >>> rest.py controller potentially uses all of them given which method is >>> called in the controller. There also seems to be an undocumented >>> response.models_to_run method that I'm not sure I understand fully. >>> >>> What would be the best way to reduce the response time of this rest.py >>> controller? Can I put response.models_to_run inside each of the controller >>> methods in rest.py, to ensure that only the models we need for the >>> operation are compiled? Am I off track here, and the model compilation is >>> not the source of latency? >>> >>> >>> >>> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

