Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the opposite of lazy loading?

Is there a common term / catch-phrase for the opposite of lazy loading?

like image 672
hakre Avatar asked Mar 25 '11 02:03

hakre


People also ask

What is lazy and eager loading?

Lazy Loading vs. Eager Loading. While lazy loading delays the initialization of a resource, eager loading initializes or loads a resource as soon as the code is executed. Eager loading also involves pre-loading related entities referenced by a resource.

What is an eager load?

Eager loading is the process whereby a query for one type of entity also loads related entities as part of the query. Eager loading is achieved by the use of the Include method. It means that requesting related data be returned along with query results from the database.

What is early loading?

Early loading refers to loading that occurs at any time between 48 hours and 3-6 months.

Which is better lazy loading or eager loading?

Use Eager Loading when you are sure that you will be using related entities with the main entity everywhere. Use Lazy Loading when you are using one-to-many collections. Use Lazy Loading when you are sure that you are not using related entities instantly.


2 Answers

The oposite term for lazy loading is eager loading.

Eager loading is essentially computing the tasks when you ask for it.

Lazy Loading is when you only do the computation when it is required.

like image 137
Mike Lewis Avatar answered Sep 21 '22 12:09

Mike Lewis


I've seen the terms "Eager Loading" and "Aggressive Initialization" both used.

like image 42
bdk Avatar answered Sep 22 '22 12:09

bdk