Lazy loading

From Green software

(Difference between revisions)
Jump to: navigation, search
Current revision (13:52, 15 September 2010) (edit) (undo)
 
Line 2: Line 2:
The opposite of lazy loading is Eager Loading.
The opposite of lazy loading is Eager Loading.
-
 
-
This best practices was recognized as such in [[Energy efficient software (Master Thesis)|''Energy efficient software'']].
 
== Advantages ==
== Advantages ==
Line 19: Line 17:
Lazy loading has been judged by professionals as common practice among experienced software programmers. Lazy loading is done to increase performance.
Lazy loading has been judged by professionals as common practice among experienced software programmers. Lazy loading is done to increase performance.
-
== See Also ==
+
== Sources ==
 +
This best practices was recognized as such by IT professionals, described in [[Energy efficient software (Master Thesis)|''Energy efficient software'']].

Current revision

Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program's operation if properly and appropriately used.

The opposite of lazy loading is Eager Loading.

Contents

Advantages

Especially on systems with limited RAM memory, when objects are not loaded into memory unnecessarily this allows for an increase in performance. Even on systems with a lot of RAM memory, having more RAM memory available for other tasks can relieve use of virtual memory. Use of virtual memory, especially on systems with a hard-disk drive, can be very energy inefficient.

Drawbacks

Lazy loading can also be energy inefficient, because it disallows the use of batched I/O. Keeping the storage device from turning idle, can be very energy consuming.

Decrease module granularity

A high level design decision to support lazy loading, involves splitting a software system up in small modules. Splitting up a software system in smaller modules however does often introduce some overhead when compared to a monolithic version of the same software.

Implementations

Lazy loading has been judged by professionals as common practice among experienced software programmers. Lazy loading is done to increase performance.

Sources

This best practices was recognized as such by IT professionals, described in Energy efficient software.

Personal tools