mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-17 00:25:54 +00:00
docs: add diagrams for lazy loading, leader election, leader followers, lockable object
This commit is contained in:
@@ -35,6 +35,10 @@ Wikipedia says
|
||||
|
||||
> Lazy loading (also known as asynchronous loading) is a technique used in computer programming, especially web design and web development, to defer initialization of an object until it is needed. It can contribute to efficiency in the program's operation if properly and appropriately used. This makes it ideal in use cases where network content is accessed and initialization times are to be kept at a minimum, such as in the case of web pages. For example, deferring loading of images on a web page until they are needed for viewing can make the initial display of the web page faster. The opposite of lazy loading is eager loading.
|
||||
|
||||
Sequence diagram
|
||||
|
||||

|
||||
|
||||
## Programmatic Example of Lazy Loading Pattern in Java
|
||||
|
||||
The Lazy Loading design pattern is a performance optimization technique that delays the initialization of an object or a costly computation until it's absolutely necessary. This pattern can significantly improve the performance of your application by avoiding unnecessary computation and reducing memory usage.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Reference in New Issue
Block a user