Skip to content

Two flavors of virtualization

Dima Enns edited this page Jun 29, 2020 · 3 revisions

IDataVirtualizingCollection - The Big One

IDataVirtualizingCollection

The IDataVirtualizingCollection is the right choice if you want to represent the whole virtualized backend in a IList-instance. The count of this list will be the same as the count of all elements stored in the virtualized backend. However, the data itself will be loaded page-wise and on demand as requested by the indexer. Each page is loaded completely (page size is configurable). The picture above illustrates a small example:

Let's say the virtualized backend contains 28 instances (datum) of data and the page size is set to five. The picture shows IDataVirtualizingCollection instances virtualizing this backend, which are in two different states. Several ways are possible to get to these states. For the partly loaded state an iteration from the 8th to the 17th datum could have taken place or maybe the 7th, 14th and 16th datum were requested explicitly without iteration. The actual request sequence doesn't matter, it is important to know that at least one of the page's datum was requested (let's ignore the preloading option for now). No instance of data from the empty pages were requested yet. Please note that in the actual implementation empty pages aren't instantiated before their data is requested, they are shown in the picture solely for illustrative purposes. In the fully loaded IDataVirtualizingCollection instance at least one datum from each page was requested. Depending on your configuration your virtualization may or may not be able to get into a fully loaded state. There are options to hoard once loaded pages or to dispose pages which weren't requested for a while (least recently used - LRU). In this example either the hoarding option was chosen or the LRU-option was set up with such an margins that no actual disposal is triggered. Note that the last page only contains three elements and not the configured page size of five. This will occur if the count of data instances in the backend doesn't divide by the page size without remainder. In this case the last page is the remainder, metaphorically speaking.

ISlidingWindow - The Small One

ISlidingWindow

To be continued…

Clone this wiki locally