Lazy loading

From Green software

(Difference between revisions)
Jump to: navigation, search
(New page: 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 pr...)
(References)
Line 20: Line 20:
== References ==
== References ==
 +
[1]. Gude, S. 2010. [[Energy efficient software (Master Thesis)|''Energy efficient software'']].

Revision as of 13:46, 15 September 2010

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.

See Also

References

[1]. Gude, S. 2010. Energy efficient software.

Personal tools