docs: add diagrams for lazy loading, leader election, leader followers, lockable object

This commit is contained in:
Ilkka Seppälä
2025-04-06 21:22:32 +03:00
parent d8b07ac484
commit 72eeb167c5
8 changed files with 16 additions and 8 deletions
+4
View File
@@ -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
![Lazy Loading Sequence Diagram](./etc/lazy-loading-sequence-diagram.png)
## 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