Re: [web2py] perfomance - import vs (vars)

2015-08-28 Thread Michele Comitini
You can use the web2py profiler to see what happens using a loop calling the function. In theory 2nd is faster, because there are fewer storage lookups, but difference should be really minimal. 2015-08-28 11:28 GMT+02:00 Dmitri Ermolaev : > > best perfomance in modules?? > > 1 > def get_gift_code

[web2py] perfomance - import vs (vars)

2015-08-28 Thread Dmitri Ermolaev
best perfomance in modules?? 1 def get_gift_code(): from gluon import current request = current.request v = request.vars... 2 def get_gift_code(request): v = request.vars -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2p