That's a good point. Note, you can use conditional models, so models that 
are only needed by a particular controller or function are only defined on 
requests to that controller/function. You can also define models in a class 
or function in a module and only import and define the models specifically 
when they are needed. For smaller apps with few models, running on every 
request shouldn't add too much overhead.

Note, in some cases, some parts of the model may be request specific (e.g., 
a default set to request.now, or a validator using an item in request.vars 
as an argument), so it can be helpful to generate the definition at the 
time of the request.

Anthony

On Friday, April 27, 2012 4:27:21 AM UTC-4, Khalil KHAMLICHI wrote:
>
> IMHO, models should be read only once (start), and then upon admin wish by 
> using some sort of reload, I believe this kind of realtime configuration of 
> web2py comes at a huge cost of performance and no percieved benefets, here 
> is a  real world example, I have applications running for years now, the 
> code never changed, but still those applications at each and every request 
> read model file and process it for each one of the thousand of requests per 
> day. 
> I might be wrong.
>
>>  

Reply via email to