What is Lazy Loading?

Question :

What is Lazy Loading?,

Answer :

What is Lazy Loading?

[Edit after reading a few answers]
Why do people use this term so often?

Say you just use a ASP/ADO recordset and load it with data or ADO.NET Datasource for a gridview.

I guess I should have asked why people use the term Lazy Loading, what “other” types are their?

,

It’s called lazy loading because, like a lazy person, you are putting off doing something you don’t want to. The opposite is Eager Loading, where you load something right away, long before you need it.

Read More  Difference between NULL and null in PHP

If you are curious why people might use lazy loading, consider an application that takes a LOOOOONG time to start. This application is probably doing a lot of eager loading… loading things from disk, and doing calculations and whatnot long before it is ever needed.

Compare this to lazy loading, the application would start much faster, but then the first time you need to do something that requires some long running load, there may be a slight pause while it is loaded for the first time. Thus, with lazy loading, you are amortizing the load time throughout the course of running your application… and you may actually save from loading things that the user may never intend to use.

Read More  How to find untracked files in a Perforce tree? (analogue of svn status)

That’s the answer What is Lazy Loading?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you