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 <[email protected]>:

>
> 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/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> 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/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to