Improve response time when the Rational Change server populates list box values

When to use and not to use an external cache for list box values

The external list box feature is an enhancement added in IBM® Rational® Version 5.3, from Fix Pack 5.3.0.2 onward. Ritesh Nigam explains when to use and when not to use an external list box values cache to improve server performance. He provides the code to add to the configuration file and other instructions. This information is helpful if you use external list box scripts extensively on your Rational Change server.

Ritesh Nigam (ritesh.nigam@in.ibm.com), Staff Software Engineer, I.B.M.

author photoRitesh Nigam is a software engineer with eight years of experience in software development. He has been working as a senior developer for IBM Rational Change for more than five years. He also has experience in Java, Java 2 Enterprise Edition (J2EE), Perl, and web technologies, such as Dojo toolkit, Ajax, web services, OSLC, and change and configuration management.


developerWorks Contributing author
        level

05 April 2013

The problem, solution, and benefits

The external list box feature in IBM® Rational® Change can access the list box values (in the CCM_LISTBOX web type) by running a JavaScript or Python script that is associated with a list box attribute. This adds the capability to fetch list box values from any source, including from the Rational Change database or from other software.

If an administrator sets a list box as an external one in the list box manager interface, its values are fetched dynamically by running an associated script on the server side. This happens whenever an external list box is accessed (by hovering a mouse cursor, for example) by a user in a Submit, Show, or Transition form. Running that script every time while accessing the list box generally results in a delay in populating the list box values in the forms, but that depends on what the script is doing to fetch the values. To overcome this delay, a list box values cache was introduced in Rational Change Version 5.3.

Enabling a list box values cache avoids having the server run an external script every time. This results in better response time from your server while it is populating list box values.


How the external list box value cache works

This is an enhancement to the existing external list box capability. Rational Change now builds a cache of external list box values by running all of the associated list box scripts when the server starts. This helps reduce the overhead of executing the scripts every time that the list box attribute is accessed, which reduces server response time.

This list box cache is either created or updated in two situations:

  • During startup of the server, the cache is created
  • On reloading the configuration data, if the cache is not already present, it is created. If it is already present, it is updated by running the associated script for every external list box attribute.

When to use and not to use a cache

Caching is helpful if the data returned by scripts is static and list box values do not change frequently. The browserInfo.js JavaScript file included with the default dev_process is an example of a static script where caching is useful.

There are few scenarios where external list box values caching is not recommended:

  • While fetching the data from an external source, such as a database
  • When reading from a file where content changes frequently
  • If the content is user-specific and if the script requires user information as an argument

Therefore, turning caching on is not recommended when the script is returning the data that is very dynamic in nature. Keeping caching on in such situations can return outdated data.


How to configure the external list box values cache

You can configure the external list box values cache through the pt.cfg configuration file on a Rational Change server. This configuration entry provides a way to turn the caching on or off.

Add the following configuration entry to the pt.cfg file to manage the external list box values cache:

[CCM_SYSTEM][CACHE_EXTERNAL_LISTBOX_VALUES]true[/CACHE_EXTERNAL_LISTBOX_VALUES]
[/CCM_SYSTEM]

These are the valid values for this configuration entry:

true
Turns the caching on.
 
false
Turn the caching off.
 

This needs to be followed by loading the configuration data from the Admin interface.

By default, this entry does not exist in the pt.cfg file. Therefore, the administrator must add it to enable this feature.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=863715
ArticleTitle=Improve response time when the Rational Change server populates list box values
publish-date=04052013