The moose likes JSF and the fly likes JSF <<f:selectItem> will increase execution time? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF <<f:selectItem> will increase execution time?" Watch "JSF <<f:selectItem> will increase execution time?" New topic

JSF <<f:selectItem> will increase execution time?

Satheeshkumar Subramaniam

Joined: Jul 06, 2009
Posts: 21
Hi all,
in my fspx page, i am populating lists as below for most of the combo box

<f:selectItem itemLabel="All" itemValue="allValues" />
<f:selectItem itemValue="Blank" itemLabel="Call Anytime" />
<f:selectItem itemValue="B" itemLabel="Bad Phone Number" />
<f:selectItem itemValue="E" itemLabel="Emergency" />

my question is .,wil it increase page execution time? populating list in jave code and using <f:selectItmes> wil decrease execution time?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17276

The first rule of optimization is never to code what you "know" is efficient. Code it to work, then measure where it needs tuning -- if anywhere. I've been relied on to provide efficient, reliable software since before we herded velociraptors here on the Ranch because cows hadn't been invented yet. And every blamed time, the place where the performance problems were found were not the places that people "knew" there would be inefficiency.

Obviously, using a bubble sort where a heapsort is appropriate is a type of early optimization that should be considered. Although I had one major production system where the data was in worst-case order for heap- and quick- sorts and the optimal was a Shellsort, instead.

But worrying about imagined overhead for trivial common functions is a waste of your time and effort. Until proven otherwise. Anything really bad would have been optimized by the framework designers, since they, too, have a stake in efficient software.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: JSF <<f:selectItem> will increase execution time?
It's not a secret anymore!