File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF <<f:selectItem> will increase execution time?" Watch "JSF <<f:selectItem> will increase execution time?" New topic
Author

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

Satheeshkumar Subramaniam
Greenhorn

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: 16054
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSF <<f:selectItem> will increase execution time?