This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Satheeshkumar Subramaniam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18272
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic