Flexibility and Performance

Accessing a program via the dynamic loader is less efficient than accessing it directly via direct reference, even if the program has been linked into a system executable. If the program needs to be dynamically loaded the program needs to be read off disk. If the program is an .int file or .gnt file all subsequent calls in the program use the dynamic loader, so performance drops still further. However, the dynamic loader does give great build and run-time flexibility.

Dynamic loading of programs is especially suitable in a development environment. This is because it requires no link process, speeding the edit, compile and run cycle. It also gives more flexibility; you can even, while debugging, reload a changed version of a subprogram while the rest of the application remains running.

In environments where the application generally runs with a single user, you might need to use dynamically loaded .int files or .gnt files if the amount of memory available is limited. Dynamic loading provides you with full use of the memory management options provided by the dynamic loader of Visual COBOL, enabling you to control the amount of memory required by your application.

In environments where the application generally runs with multiple users, both memory efficiency and performance generally favor an application consisting of a system executable, linked shared libraries and/or callable shared objects. If the subprograms are very large or very numerous they can be combined into callable shared objects or, if size is more important than performance, packaged as .int files or .gnt files.