Skip to main content link. Accesskey S
  • Log In
  • Help
  • IBM Logo
  • WebSphere Portal Family wiki
  • All Wikis
  • All Forums
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
Community Articles Product Documentation Learning Center IBM Redbooks This category IBM Redbooks: Building a Sample Website Using IBM Web Content Manager 7.0 IBM Redbooks: Building and Implementing a Social Portal IBM Redbooks: Developing Exceptional Multi-Channel Web Experiences V7: IBM Web Content Manager Product Documentation V7: IBM WebSphere Portal Enable for z/OS Product Documentation V7: IBM WebSphere Portal Express Product Documentation V7: WebSphere Portal Product Documentation V8: IBM Web Content Manager Product Documentation V8: IBM WebSphere Portal Express Product Documentation V8: IBM WebSphere Portal Product Documentation (includes z/OS) Custom Search Scope...
Search
Community Articles > Performance > Performance for WebSphere Portal > Portlet Timers for Portal 7 / 8
  • New Article
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

IBM contributorThomas Hurek
Contribution Summary:
  • Articles authored: 3
  • Articles edited: 0
  • Comments Posted: 0

Recent articles by this author

Tuning IBM WebSphere Portal and IBM Web Content Manager for best anonymous page performance

This article demonstrates the rationale for and benefits of using anonymous pages as well as a process for configuring IBM WebSphere Portal, IBM Web Content Manager, and the Web server to provide maximum performance.

Portlet Timers for Portal 7 / 8

This article describes how to add timer code to the Portal to compute and display the execution time of each portlet on the page. While this was easily possible in themes that did not use webdav the new themes do not allow the insertion of scriptlets into the skin code.

Integrating iframes, flash and other applications into Portal without losing the client side state using Server Side Aggregation

The challenge with integrating applications into WebSphere Portal that store their state on the client like Adobe Flash or iframes or Microsoft Silverlight is that the client side state is lost when switching pages. This article describes how to keep the client side state alive despite switching ...

Community articlePortlet Timers for Portal 7 / 8

Added by IBM contributor Thomas Hurek | Edited by IBM contributor Thomas Hurek on September 11, 2012 | Version 6
  • Edit
  • More Actions Show Menu▼
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
expanded Abstract
collapsed Abstract
This article describes how to add timer code to the Portal to compute and display the execution time of each portlet on the page. While this was easily possible in themes that did not use webdav the new themes do not allow the insertion of scriptlets into the skin code.
Tags: skin timer performance troubleshooting

When troubleshooting performance it can be very helpful to find out how much time is spent in the execution of each portlet that is on the page. Once identified which portlets are taking the majority of time it is possible to add more tracing and additional measures to get to the root cause of the performance issue.

While in the Portal 6.x themes one could add the code to compute the time in the Control.jsp file ( as described below) this is no longer possible with WebSphere Portal 7 and 8 themes.

How to add a Skin timer to a Portal 6.x skin:

Add the following code around the portletRender tag in the Control.jsp of each skin:


	 <div style="border: 1px solid red; padding 2px;">

	 <% long start = java.lang.System.currentTimeMillis(); %>

	

	… <wps:portletRender…> … </wps:portletRender> …

	

	<div style="color: red; padding: 4px; border: solid red; ">

	 <%= java.lang.System.currentTimeMillis() - start %>ms

	 </div>

	 </div>

	

The Portal 7 and 8 themes using webdav like the Page Builder 2 or the Portal 7.0.0.2 theme store the static markup in webdav and integrate the portlet output via a dynamic content spot. Since the markup code in webdav is not executing as part of a jsp one can not add the timer code to it.

The attached ear file adds the timer code as part of the portlet markup in form of a global portlet filter.

To install the code download the attached ear file and deploy it to your environment. After startup the ear file automatically registers with Portal and starts working.

The module creates entries in both SystemOut.log as well as the rendered html.

The log output looks like the following and is always prefixed with PortletPerfFilter:

	[6/11/12 22:14:41:990 EDT] 0000007a PerformanceFi W PortletPerfFilter: Render Header Request for portlet /wps/PA_WCMLRingPortJSR286 took msecs: 995

	

The generated div uses the class portletperformance - it is possible to customize the look of the render time in the html output with css.

The html output looks like the following in the resulting html of the page for each portlet:

	<div class="portletperformance" style="color: red;">Msecs taken: 455</div>

	

 

Limitations and Considerations:

- The code is provided "AS IS", without warranty of any kind. IBM shall not be liable for any damages arising out of your use of this code, even if they have been advised of the possibility of such damages.

- Right now the Module only supports JSR 286 portlets

- Only the 2nd part of the render phase (not the part for setting headers and cookies) is included in the html output - everything else is logged into the SystemOut.log

 

The ear file can be downloaded from Lotus Greenhouse:

https://greenhouse.lotus.com/files/app?lang=en_US#/file/54ea02c0-31a2-4b77-9539-02c4510de8f6

 

The author is interested in feedback on the module and would like to improve the module based on your feedback.

 

About the Author:

Thomas Hurek is a software architect at IBM's Research Triangle Park Development Lab. He has worked on the WebSphere Portal development team for 11 years, focusing on various components, including security and virtual portals. In his current role Thomas supports clients as lab based services consultant and works as Chief Programmer on the development of the product. You can contact Thomas at thurek@us.ibm.com.


  • Edit
  • More Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (6)
collapsed Versions (6)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (6)Sep 11, 2012 4:54:00 PMThomas Hurek  IBM contributor
5Jul 23, 2012 4:11:37 PMDeAnna Steiner  IBM contributor
4Jun 11, 2012 11:13:18 PMThomas Hurek  IBM contributor
3Jun 11, 2012 11:05:46 PMThomas Hurek  IBM contributor
2Jun 11, 2012 10:57:11 PMThomas Hurek  IBM contributor
1Jun 11, 2012 10:38:09 PMThomas Hurek  IBM contributor
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • FacebookIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkIBM Collaboration Solutions
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use