Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

WebLogic Portal 10.2 Optimization

Added 30 Jul 2008

One note about the View APIs, there is an optimization that was added to WLP 10.2 that causes the Portal servlet to place the DesktopView in the request as an attribute. This can be beneficial because the View heirarchy can be expensive to generate with many database calls. If a copy is already available then there is no need for the site map portlet to build it's own copy.

The problem with this from a portlet perspective is that the copy is only available on the first request the Portal servlet needs to fetch the View tree. Typically the user would go to the Portal home page on the first request, where the DesktopView would be available, and then go to the site map on a subsequent request with the DesktopView object no longer being available.

In cases where the desktop is not customizable it makes sense to take advantage of the availability of the DesktopView and pre-load the sitemap in advance. Since the sitemap is cached globally, pre-loading it avoids taking a second unnecessary hit building the view object for the first user who accesses it. This can be easily accomplished by creating a backing file for the Portal desktop that checks if the DesktopView is in the request and then gets a site map in order to force it to be generated and cached.

In cases where the user desktop is customizable, you have to determine if pre-loading the site map is worthwhile since it would be cached on a per user basis. Many users will not access the site map over the course of their session and having the site map cached for each concurrent user may be onerous in terms of memory usage.

In either case, one other useful feature of this attribute is that the presence of the DesktopView in the request also signals that the desktop has changed. This means it could be used to clear the cache entry for given site map in order to ensure it is regenerated for the new Desktop layout. An example of this is if the user or administrator customizes the desktop.

An implementation of this desktop backing file is left as an exercise to the reader.