Eager and Lazy loading Flashcards
1
Q
what principle does eager and lazy loading work on
A
we can have a good idea of what is needed before it is asked for
2
Q
what is eager loading
A
fetch something when it is asked for
3
Q
what are the benefits/disadvantages of eager loading
A
single instruction
less time overall
latency of first access is higher
4
Q
what is lazy loading
A
fetch something (or part of something) when it is needed
5
Q
what are the pros and cons of lazy loading
A
saves resources
delay every time you need something