There are a number of configuration options that you can set in the File Handler configuration file to optimize the performance
of your file handling operations.
- You can increase the number of indexed file nodes that are cached, as opposed to being held on disk, using the INDEXCOUNT
configuration option. An increase from the default (32) may further improve performance, but this will be at the expense of
You can stop the File Handler from obtaining a semaphore when it executes an I/O operation that does not modify a shared file.
In such a context, a semaphore is a lock applied to a reserved location in the file, which inhibits access to the file by
more than one user. This extra call impairs performance. To stop the File Handler from obtaining a semaphore, ensure the READSEMA
configuration option is OFF; this option is OFF by default.
- LOCKTYPE & IGNORELOCK
- Testing for the presence of record locks is expensive in terms of performance, and by default the File Handler:
- Returns a locked-record file status when it finds a locked record, but also returns the data in the record area.
- Tests for the presence of a file lock when it executes a read operation that does not request a lock.
You can adjust the use of record locks to eliminate this step by using either of the following configuration options:
- LOCKTYPE. Set this to 1 to prevent access to locked records.
- IGNORELOCK. Set this to ON to stop the File Handler testing for locks when it performs an I/O operation that is not itself
trying to obtain a lock. If you set LOCKTYPE to 1, the setting of IGNORELOCK is irrelevant.
- You can force the File Handler to load an entire file into memory when it opens the file, and to execute all file operations
in memory, only writing back to disk when the file is closed. Force this behavior by setting LOADONTOHEAP to ON. This setting
is available only for non-shared files. Micro Focus recommends setting this option with care and only on small files.
- Use DATACOMPRESS to enable or disable data compression on sequential or indexed files. It is disabled by default. There is
also a Compiler directive of the same name, which enables you to set data compression on a file by file basis, by setting,
and then unsetting, the directive before and after the SELECT statement of the required file.
- For sequential files, use SEQDATBUF to set the buffer size when accessing the file. Increasing the buffer size has shown to
greatly increase performance.