just-in-time initialization
What does just-in-time init开发者_Go百科ialization means?
This is "lazy" initialization, i.e. initialization performed only when/if the underlying module or feature is needed for the first time.
The purpose of this practice is to save time and, to a lesser extent, memory or other run-time resources by not loading modules which are not systematically needed in a given session of the application.
It is particularly useful for HTML pages, for which only the essential resources are loaded along with the main page, but all other resources are merely marked with a placeholder in the DOM containing only the necessary info for some [typically] javascript snippet to effectively replace the location so the underlying image or other resource gets loaded, following some action from the user (or also some timer event) when needed. See this article for more info about the use of JITI with web pages
With HTML this makes for faster load of the page, giving the idea of a snappier application because pages load faster.
In Just in time initialization Loads object only when an attribute is get or set or when these fields are accessed.
Non-lazy initialization retrieves an object and all of its related objects at load time.
Just in time initialization increases the performance and effective utilization of resources .
If you are looking for Hibernate Just-in-time initialization check out this document
精彩评论