Lazy loading, also known as dynamic function loading , is a mode that allows a developer to specify what components of a program should not be loaded into storage by default when a program is started. Ordinarily, the system loader automatically loads the initial program and all of its dependent components at the same time. In lazy loading, dependents are only loaded as they are specifically requested. Lazy loading can be used to improve the performance of a program if most of the dependent components are never actually used.
A developer can enable lazy loading on a component-by-component basis in both thread ed and non-threaded applications. The disadvantage of lazy loading is that if a component call s most of its dependents, every function call to a lazily loaded component requires extra instructions and time. Consequently, if a program can be expected to use most of its dependent components, then lazy loading will probably not improve performance.