Which would be fastest. i am sure scriptlets will perform the fastest, but i was just wondering if anyone could tell me how much slower would JSTL + EL + Custom Tags perform in a typical application and if its worth not using them at all, and opting only for scriptlets (of course, at the cost of too much Java in a JSP).
Hi Bear, since EL would use Reflection (would it not?) to run the code, i have a very strong gut feel that it would run slower than direct Java programming through scriptlets. So, I was assuming that JSTL won't be so fast as direct scriptlet programming. In fact, that was the reason in one of my projects i have used scriptlets, where i was the only developer / designer.
Avi, thanks for your reply, but i was actually trying to compare scriptlets in JSP with JSTL + EL in JSP.
Suresh S Babu wrote:since EL would use Reflection (would it not?) to run the code, i have a very strong gut feel that it would run slower than direct Java programming through scriptlets.
I'm glad you're not my doctor: "My gut feeling is that this steak knife will cut faster than a scalpel..."
In fact, that was the reason in one of my projects i have used scriptlets, where i was the only developer / designer.
Without any testing? Just on "gut"? Seriously?
Do you not think that perhaps there is similar, just different, overhead to processing scriptlets? For example, the syntax of scriptlets is much more complex than the simple XML-based JSTL. Did you measure the performance difference of that?
Do you use any other Java components in your web app? Do they most likely not use reflection as well? Did you use a database, which is where most "slowness" is introduced into an app?
Is any of that more than just noise in the face of network latency?
And even if there is a difference -- and there are too many variables for any "gut" to give you a valid answer -- is it even worth worrying about if it's so marginal that the end user is completely unaffected?
Put the steak knife away and pick up your scalpel...
Suresh S Babu
Joined: Apr 23, 2009
Liked your comments. :-) . Can say that i am a little more wiser now thanks to your comments!
Will surely run a test using JSTL and using scriptlets alone and then decide for myself.
In the meanwhile, i was interested in finding out about different people's findings about differences in performance between these two.
subject: JSTL + EL + Custom Tags performance vs Scriptlet performance