So is really the only way to avoid having a reflection call every time
you use a snippet to use a DispatchSnippet with a case statement for
every method ?
It's just that i don't really think that the case is a very clean way
of doing things. Can be ok for a couple of methods but it can be
really ugly with more than that.
So, is there any other way ?
Thanks.
Im afraid voodoo is not yet compatible with the JVM ;-)
Cheers, Tim
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>
I just read http://wiki.github.com/dpp/liftweb/about-snippets and i
have the following question:
So is really the only way to avoid having a reflection call every time
you use a snippet
to use a DispatchSnippet with a case statement for
every method ?
It's just that i don't really think that the case is a very clean way
of doing things.
Can be ok for a couple of methods but it can be
really ugly with more than that.
So, is there any other way ?
Thanks.
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
I may be over simplifying things, but if at startup Lift would go
through all snippet classes and using reflection found all the methods
kept all the mappings somewhere in memory i think it could work.
Is this doable ?
On 9 Fev, 17:01, Timothy Perrett <timo...@getintheloop.eu> wrote:
> So you don't want to write any explicit mapping, and you don't want to use reflection??? How would you propose Lift know what your asking for?
>
> Im afraid voodoo is not yet compatible with the JVM ;-)
>
> Cheers, Tim
>
> On 9 Feb 2010, at 16:54, Hugo Palma wrote:
>
>
>
> > I just readhttp://wiki.github.com/dpp/liftweb/about-snippetsand i
Why doesn't Lift create the mapping at startup using reflection ?
It's not using reflection that's the problem, it's using reflection at
runtime for every single snippet usage.
I may be over simplifying things, but if at startup Lift would go
through all snippet classes and using reflection found all the methods
kept all the mappings somewhere in memory i think it could work.
Is this doable ?
> > I just readhttp://wiki.github.com/dpp/liftweb/about-snippetsand i
On 9 Fev, 17:01, Timothy Perrett <timo...@getintheloop.eu> wrote:
> So you don't want to write any explicit mapping, and you don't want to use reflection??? How would you propose Lift know what your asking for?
>
> Im afraid voodoo is not yet compatible with the JVM ;-)
>
> Cheers, Tim
>
> On 9 Feb 2010, at 16:54, Hugo Palma wrote:
>
>
>
> > have the following question:> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> > So is really the only way to avoid having a reflection call every time
> > you use a snippet to use a DispatchSnippet with a case statement for
> > every method ?
> > It's just that i don't really think that the case is a very clean way
> > of doing things. Can be ok for a couple of methods but it can be
> > really ugly with more than that.
>
> > So, is there any other way ?
> > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
Thanks for you help.
"works perfectly for development / low volume deployment"
which isn't the case for the application i'm building.
On 9 Fev, 17:14, David Pollak <feeder.of.the.be...@gmail.com> wrote:
> > liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com >
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/liftweb?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com >
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
-------------------------------------
David Pollak<feeder.of...@gmail.com> wrote:
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
Again,the only reason i raised this question it's because i was alarmed by what the wiki page about reflection snippets says:"works perfectly for development / low volume deployment, however when your site starts to scale this method of snippet modeling may become undesirable."All i would like is some clarification if this statement is in fact true, if not i will go on with my project happily using reflection snippets. If it is true i then would be looking for a better alternative.
I really don't get your response, as Hugo just asked about a statement on the wikipage, which very clearly says that using reflection snippets brings a performance hit and is discouraged to be used in production. Now, it may very well be that this statement shouldn't be there as it's not true - which is your opinion I think.
Maybe it would be better to write something like:
"If you are experiencing performance problems because of too many reflection calls, the cause may be using reflection snippets. Consider using dispatch snippets".
But why do you say to new users who just ask about statements from the wiki that their posts are time-wasting and that they can get less attention in the future I really don't understand.
Peace :)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
>I really don't get your response, as Hugo just asked about a statement on the wikipage, which very clearly says that using reflection snippets brings a performance hit and is discouraged to be used in production. Now, it may very well be that this statement shouldn't be there as it's not true - which is your opinion I think.
> All i would like is some clarification if this statement is in fact true, if not i will go on with my project happily using reflection snippets. If it is true i then would be looking for a better alternative.
>
> It is much better practice in my opinion to use an explicit dispatch. But you do whatever you want. If it becomes a performance problem for you and you're on a production site, then we'll look at it.
>
> More broadly, we like to help newbies and folks with live production sites. But, we also expect that newbies will bring us real issues that they themselves are facing, not premature optimizations. We have limited time to help people and wasting (and this thread has crossed seriously into time-wasting land) time with stuff that doesn't really impact you means that (1) you will get a lot less attention in the future (think the boy who cried wolf) and (2) it lowers the quality of discussion for the rest of the folks on the list.
Maybe it would be better to write something like:
"If you are experiencing performance problems because of too many reflection calls, the cause may be using reflection snippets. Consider using dispatch snippets".
But why do you say to new users who just ask about statements from the wiki that their posts are time-wasting and that they can get less attention in the future I really don't understand.
Peace :)
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
I think that the statement on the wiki may sound too authoritative and that may be the source of misunderstanding - I'll edit the wiki to clear this up. I remember I've also wondered about this sentence when I was starting to get to know lift.