I previously ran into an interesting practice called occlusion culling in game development. I am still researching to gain more understanding of how it works, since this is mostly discussed in game programming/tools/IDEs such as Unity, so I am applying the practice to data management in application development.
Other names for the practice as defined on the wiki here: Surface determination (also known as hidden surface removal (HSR), occlusion culling (OC) or visible surface determination (VSD))
My understanding of the practice is that when rendering 3D graphics, an algorithm is used to determine what objects should be rendered, and in memory, based on some view/camera perspective. This is mainly used to use graphical memory more efficiently, but it does not necessarily make non-graphical memory usage more efficient, as the data behind the non-rendered objects is still being manipulated.
As for applying the practice, I am attempting to use the aspect of managing data loaded during run-time of an application, where the data could be rows, specific values, or some object.
From an application standpoint, this appears to be similar to either some form of lazy loading or stateless calls/events.
private Lazy<Foo> DataItem;
public void GoToNextView()
{
DataItem = new Lazy<Foo>();
//return data to some display
}
For the above example, the previous data would be cleared/set for garbage collection via the new constructor, then there would be potential new data to be loaded.
Here is a specific example:
For some paged table, there is only data specific to the page loaded, then on "Next" the previous page is unloaded and the new page is loaded. this practice lends itself to be more event-based in my mind, and that is mainly due to thinking in terms of the UI/frontend aspect of an application. Unless doing data manipulation from the codebehind of some UI, I cannot see a good example of using lazy to help in data management, since the UI would be loading the data more immediately rather than wait for a specific step. (please correct if my understanding is not correct between lazy loading and stateless)
From a framework/custom library perspective, I believe that there could be more differences between the two practices, since there is the potential for more instances of data manipulation and incremental steps that can precede certain data loads.
private Bar DataItem;
public Bar Process()
{
DataItem = new Bar();
//return some processed/manipulated Bar value
}
private Lazy<Bar> OtherDataItem;
public Bar OtherProcess()
{
OtherDataItem = new Lazy<Bar>();
//process other items
//at some step, get the value associated to the variable via OtherDataItem.Value
//return some processed/manipulated Bar value in respect to the other processed items
}
In this case, there is a difference in data management, where the first will hold the full data associated to the type from beginning to end (end being either end of the method or disposing/garbage collection). From my understanding of lazy, the data will not actually be retrieved until the Value is called, so the data would not be held from beginning to end (I believe that there is also a check in the background for disposing unused data for lazy types, and I do not know if that is true or deals with some other specific thing).
I am looking for practices in application development that achieve the same goal of data management based on being in focus like the practice seen in game development. I do not know if there is a chance that this is actually a tool rather than a practice, since research tends to lead me towards usage in Unity.
For my question(s), what application development practices actually fall within the data management practice shown in occlusion culling from game development practices? If the above two specified application development practices are equivalent to that game development practice, then does the understanding that I am trying to convey appear accurate?
Again, I am still researching and diving into any information that I can find, and my knowledge may not be correct on either side (application or game development). I feel that I am at a point, where I need to have a check on my understanding before committing to that idea and advancing. I welcome any corrections or questions to my understanding.