GNOME 2.2 Desktop on Linux System Administration Guide

Improving Performance of Help

The source documents for the Help are XML files. The XML files are converted to HTML, and the Yelp Help browser displays the HTML. The HTML can be pregenerated, that is, the XML can be converted to HTML before the Help is used.

Alternatively, the conversion can be performed automatically when a user calls a Help file. If the conversion is performed when the user calls the Help file, the conversion has a significant impact on the speed with which Help documents are displayed.

To avoid performance problems with the Help, pregenerate the HTML so that the Help browser does not need to do the conversion. Use the yelp-pregenerate command to pregenerate a Help document. The syntax of the yelp-pregenerate command is as follows:

yelp-pregenerate [-a| [-f filename]] [locale]

The following table describes the options and arguments for the yelp-pregenerate command:

Option or Argument 

Description 

-a

Pregenerates all XML files that are registered in the ScrollKeeper database. This option is the default option.

-f

Pregenerates only the XML files that you specify in the command. 

filename

The name of the XML file or XML files that you want to pregenerate. 

locale

The locale for which you want to pregenerate the XML files. The default locale is C, or English. 

For example, to pregenerate the English version of all XML files in the file system, run the following command:

# yelp-pregenerate -a

You do not need to specify the locale in this example, as the default locale is C. To pregenerate the Spanish version of the gedit manual, run the following command:

# yelp-pregenerate -f gedit.xml es

When a user opens a Help file, the Help browser does the following:

  1. The Help browser searches for the appropriate HTML file. If the Help browser finds the HTML file, the Help browser compares the modification dates of the HTML file and the corresponding XML file. If the HTML file is more recent than the XML file, the HTML file is displayed.

  2. If the HTML file is older than the XML file, the XML file is converted to HTML.

  3. If the Help browser does not find a HTML file for a Help document, the XML file is converted to HTML.

In other words, the Help browser displays pregenerated HTML if the pregenerated HTML file is present. If the pregenerated HTML file is not present, the Help browser converts the XML file to HTML.


Note –

You might want to pregenerate the Help for any new applications that you want to add to the GNOME Desktop. If there are severe space restrictions in your environment, you might choose not to pregenerate the Help.