I'm curious if there's any notable performance overhead with using helpers.
I have the following to list database entries on my home page:
<ul class="thumbnails">
{{for i,post in enumerate(posts):}}
{{if i==items_per_page: break}}
{{=LI(
DIV(
A(IMG(_src=URL('static', 'content', 'thumbs', args=post.image),
_class="img-polaroid"), _href=URL("view", args=post.id)),
DIV(
H2(A(post.title, _href=URL("view", args=post.id))),
SPAN(XML(post.caption), _class="muted"),
_class="caption"),
_class="thumbnail"),
_class="span6")}}
{{pass}}
</ul>
I mostly nested all the helpers so I could better learn web2py's helper
syntax. Now that I think I have a decent grasp of it I'm wondering if I
should convert what I can of this to raw HTML in the view so there is less
server-side code parsing.
Would representing this view in raw HTML instead of building it with
helpers provide any performance benefit since the server wouldn't have to
convert it to HTML?
--
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/groups/opt_out.