Re: [web2py] cost of importing into models vs define functions

2015-03-30 Thread Niphlod
On Monday, March 30, 2015 at 1:53:27 AM UTC+2, Jose wrote: > > Hi > > [*1*] > models/ > model1.py > model2.py > model3.py > model4.py > > vs > > [*2*] > modules/ > model1.py > model2.py > model3.py > model4.py > > models/ > model0.py (import model1, model2, mo

Re: [web2py] cost of importing into models vs define functions

2015-03-29 Thread Richard Vézina
I move functions declared in models... Since all my models files seems to be executed (looking to models_to_run), these functions are accessible from everywhere (globals)... Now I import all the moved functions in the same models they were commenting the old declarations and I get some speed impro

Re: [web2py] cost of importing into models vs define functions

2015-03-29 Thread Jose
Hi [*1*] models/ model1.py model2.py model3.py model4.py vs [*2*] modules/ model1.py model2.py model3.py model4.py models/ model0.py (import model1, model2, model3, model4) You say [2] is more efficient than [1]? -- Resources: - http://web2py.com - http:

Re: [web2py] cost of importing into models vs define functions

2015-03-27 Thread Niphlod
uhmyou lost me at "move some function declared kind of globally into models if importing there functions in models global kind" let's just stick to basics: models are executed at every request. Modules are imported at the first occasion and never again. On

[web2py] cost of importing into models vs define functions

2015-03-27 Thread Richard
Hello, I am in the process to move some functions declared kind of globally into models to speed my app since I found it has some important performance penalty to have been too lazy to "modulized" these functions... I would know if importing these functions in models global kind again would lea