wood burning stoves*
The moose likes JSP and the fly likes Taglibs Performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Taglibs Performance" Watch "Taglibs Performance" New topic
Author

Taglibs Performance

Heinz Elman
Greenhorn

Joined: Dec 14, 2001
Posts: 22
Hi there,
has anybody experiences in using taglibs in respect of performance. Does common use of taglibs reduce the performance of the server?
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
The simple answer is yes, using taglibs will result in a slight performance decrease over building the same functionality into the JSP source. However, the actual additional overhead is probably neglible compared to the processing that the functionality requires.
Another aspect that is worth considering is that the JSP specification provides room for container vendors to provide optimisations in the way that the tag handler instances are managed, in that they can be pooled and reused. In this situation, the overheads associated with the creation of the tag handler instances are removed and you only have the overhead of calling the lifecycle methods (doStartTag() et al). Check out some of the newer JSP containers such as Tomcat 4.1 and Resin for support for this type of tag handler pooling.
Also, for a more detailed look at some of the issues around this, check out the sample chapters (particularly chapter 8) from my book.
HTH
Simon
Heinz Elman
Greenhorn

Joined: Dec 14, 2001
Posts: 22
Hi Simon,
thanks for your reply. OK, now I know that the performance leak of our Homepage is not a problem of the tags.
We use Bea Weblogic 5.1. And in the meantime the Software has increased (concerning the ammount of classes). Specialy many EJB's (stateless ones)where added to the sources and obviously the ammount of hits has risen.
What do you think? Can the instability and the significant decrease of the perfomance of our homepage result in one of the above mentioned reasons?
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Are you now looking up more EJBs per request? Perhaps storing more references to objects within the HTTP session?
Simon
Heinz Elman
Greenhorn

Joined: Dec 14, 2001
Posts: 22
Hi Simon,
yes it seems that the problem goes hand in hand with frequent calls from a tag to a stateless ejb. this ejb is used by the tag to create the navigation.
I hope I will find some hints how I optimise the settings of our bea weblogic server in the bea weblogic forum.
Thanks,
Heinz
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Yes - that's probably a good place to start.
Don't forget that you can cache references to EJB homes, and use patterns such as the EJBHomeFactory/EJBHomeLocator/ServiceLocator to improve perfomance too.
Hope you find your answer...
Simon
 
Consider Paul's rocket mass heater.
 
subject: Taglibs Performance