ArjanCodes
20 minutes
Lazy loading is the principle of delaying the cost of loading or computing a resource until it is actually needed, in contrast to eager loading, which does all work up front. It is commonly combined with caching to avoid repeating work, time-limited caching for data that changes, generators for processing only the portion of data required, and preloading to hide latency. Rooted in demand paging in operating systems and popularized in enterprise application architecture, it is a performance-oriented design principle rather than a formal design pattern, belonging to software performance optimization and resource management.