You could do that too ... but the way I see it it would be more a
functional decision rather then a performance best practice. In some
cases you could consider <lift:embed> instead of programmatic
findAnyTemplate. It really depends on your design, preferences of
doing things etc.

Br's,
Marius

On Jan 9, 7:08 pm, greekscala <[email protected]> wrote:
> Like, makes it sense to cache a fragment xml when building a list so I
> dont have to call findAnyTemplate all the time....?
>
> On 9 Jan., 17:31, greekscala <[email protected]> wrote:
>
> > Hello Marius,
>
> > yes it is more intended for caching. Ok so I can remove this vals from
> > my code.
> > Any other simple performance rules that one should be aware of for
> > Lift?
>
> > witth best regards
>
> > On 9 Jan., 16:38, Marius <[email protected]> wrote:
>
> > > Are you using vals mainly for the purpose of caching ?
>
> > > I think it is ok to call findAnyTemplates (without using vals) as
> > > templates are cached (in production mode)
>
> > > Br's,
> > > Marius
>
> > > On Jan 9, 5:29 pm, greekscala <[email protected]> wrote:
>
> > > > Hello everyone,
>
> > > > I am surprised about the few code I have written and the effect I
> > > > get :)
>
> > > > I would like to know if this workflow can be optimized:
>
> > > > I my snippet method I "findAnyTemplate()" my xml fragments and
> > > > assigning them
> > > > to vals.
>
> > > > Then I have little functions that bind content with the above xml
> > > > fragments and return
> > > > the resulting NodeSeq, so I can do easy an SetHtml and return the new
> > > > content with
> > > > ajax.
>
> > > > I find this way very easy. So I can have many little fragments, load
> > > > them bind content
> > > > and return them via ajax.
>
> > > > Is it ok to load the fragments and save them in vals? Or can I do a
> > > > findAnyTemplate()
> > > > all the time? Or should I have snippets methods for this fragments and
> > > > let lift do the
> > > > snippet method calling?
>
> > > > with best regards
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to