Pre-loading & lazy loading

    Today when building my own Spring project and writing the persistence layer, I found a noun: preloading.

    Blind guessing is to load it in advance, but why do I need to use this thing and some extensions? I think it is necessary to dig a bit. The following is a summary of self-combining online materials:

  •      concept:

    Pre-loading: pre-loading, the user will render the page directly from the local cache when needed

    Lazy loading: lazy loading, such as a picture, first replace it with a placeholder image, and wait for the picture to be in the visible range before setting the path to load the picture

  •     Why to use them?

    Preloading: For example, some very important pictures are stored directly in the user's local cache. If you click and then visit the user to see the picture for a long time, preloading should be used to optimize the user experience.

    Lazy loading: For example, Web pages such as gallery, post bar, shopping mall, etc., sometimes there are many pictures. If you use the general method to load them at one time, the waiting time is too long, so you should use lazy loading to ease the loading pressure.

 

 

Then I flipped through the book again and looked online. These two concepts seem to be for static resources. The preloading of data on the book should be a translation problem, and it should be understood that the data is written in advance and stored in the library, rather than dynamically stored by the program

   

Guess you like

Origin www.cnblogs.com/yycjavastudy/p/12727928.html