4 ms·
What prevented me from using Playframework and going with Lift: 1. Play 1.0 (2.0 too?) used exceptions for flow control. I don't think this works for high traff
by Uchikoma 15y ago
What prevented me from using Playframework and going with Lift:
1. Play 1.0 (2.0 too?) used exceptions for flow control. I don't think this works for high traffic web sites.
2. Lift's CSS selector templating is slick, I would not like to go back to PHP/JSP/... style templating.
Very nice website.
[update: 2.0 has no more exception work flow]
- mrspeaker 15y ago2.0 doesn't use exceptions for flow control - but out of interest, what do you mean "I don't think this works for high traffic web sites"? 1 exception for a request won't affect performance, right?
- Uchikoma 15y agoAlthough exceptions have become faster, and you can speed them up (overwrite stack generation code), they are slow mostly due to filling the stack trace. Mostly based on this: http://www.javaspecialists.eu/archive/Issue187.html http://www.javaspecialists.eu/archive/Issue187.html
- axiak 15y agoThat article mentions that the performance is dependent on the fillInStackTrace() method, which play framework overrides to do nothing.
- rkalla 15y agoWas not familiar with this method, appreciate the heads up guys. Did some quick micro benchmarks and it looks like I got an 11.5x speedup in some code that was using Exceptions for flow control.
- scompt 15y agoWhere did you find the reference to no more exception work flow? That seemed to be everywhere in the framework.
- Uchikoma 15y ago"Yes no more exception for flow control." via Twitter.
- mrspeaker 15y agoFrom the source code... the controller actions are all returning values: https://github.com/playframework/Play20/blob/master/samples/kiki/app/controllers.scala#L64 https://github.com/playframework/Play20/blob/master/samples/...
- hadashi 15y ago'grep -R throw .' or you could just look at controller code...
- noelwelsh 15y agoA small nitpick: Lift does (typically) use exceptions for control flow, for redirects.