Lazy Loading - NeoSOFT-Technologies/front-end-dot-net-core-mvc GitHub Wiki

Introduction

Lazy loading (also called on-demand loading) is an optimization technique for the online content, be it a website or a web app. Instead of loading the entire web page and rendering it to the user in one go as in bulk loading, the concept of lazy loading assists in loading only the required section and delays the remaining.

Lazy loading can occur on different moments in the application, but it typically happens on some user interactions such as scrolling and navigation.

LazyLoading-Dropdown

Advantages

  • On-demand loading reduces time consumption and memory usage thereby optimizing content delivery. As only a fraction of the web page, which is required, is loaded first thus, the time taken is less and the loading of rest of the section is delayed which saves storage. All of this enhances the user’s experience as the requested content is fed in no time.
  • Unnecessary code execution is avoided.
  • Optimal usage of time and space resources makes it a cost-effective approach.

Disadvantages

  • Firstly, the extra lines of code, to be added to the existing ones, to implement lazy load makes the code a bit complicated.
  • It needs R&D and proper logic to implement (but it is resolved to some extent in this boilerplate).