开发者

just-in-time initialization

开发者 https://www.devze.com 2022-12-20 10:52 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号