Just In Time Lazy-Loading
In personal computing, there are multiple scenarios where Just in time (JIT) lazy-loading is desirable since what can be shown to the user at any point of time is limited by the screen real estate. This involves two steps: Detect changes Refresh the visible changed part during idle time Consequently, a framework to support these scenarios is desirable. Specific logic related to refreshing, like image loading or font coloring, can be encapsulated in individual functions which will be called by the framework. Detect Changes While editing a document, the number of changes will be huge. So it's better to track the extent of changes or the changed region instead of individual changes. When the file is loaded, the whole file is considered to be changed. Refresh the changed part in idle time Run a timer which kicks off when the computer is idle i.e. the user is not interacting with the computer. This is to ensure that the user never faces a lag in his interaction. If an idle timer is not