Optimizing libraries

You should optimize your libraries regularly. Optimizing removes gaps in libraries and defragments the storage of objects, thus improving performance.

Optimizing affects only layout on disk; it does not affect the contents of the objects. Objects are not recompiled when you optimize a library.

Once a week

For the best performance, you should optimize libraries you are actively working on about once a week.

To optimize a library:

  1. In either Tree view or List view, choose the library you want to optimize.

  2. Select Entry>Library>Optimize from the menu bar or select Optimize from the library's pop-up menu.

    PowerBuilder reorganizes the library structure to optimize object and data storage and index locations. Note that PowerBuilder does not change the modification date for the library entries. PowerBuilder saves the unoptimized version as a backup file in the same directory.

    The optimized file is created with the default permissions for the drive where it is stored. On some systems new files are not shareable by default. If you see "save of object failed" or "link error messages after optimizing," check the permissions assigned to the PBL.

If you do not want a backup file

If you do not want to save a backup copy of the library, clear the Save Optimized Backups check box in the Library painter's Design>Options dialog box. If you clear this option, the new setting will remain in effect until you change it.