Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Does JSTL core tag improves performance with not empty check?  RSS feed

 
Ram Charan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have JSP's which displays around hundred amount and percentage fields (which could be null or empty). I have used JSTL fmt and custom tags to format number and apply the patterns accordingly. Now considering performance is it a better approach to surround the value with JSTL core tag(<c:if>) to check if value is not empty and then include the JSTL fmt tag?

I see that JSTL fmt tag checks if value is not null and then only applies formatting, but it also evaluates other attribute values provided in the tag using ExpressionEvaluator though the value is evaluated to null.

Please provide your comments and best practices if any.

Thanks & Regards,
Ram Charan
 
Stefan Evans
Bartender
Posts: 1834
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like premature optimization to me.
I wouldn't even waste time experimenting with this unless it was shown that there was a definite issue here.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!