Source-process cache implementation

| | Comments (0)

List of requirements and design ideas for source-process cache implementation.

The Symptom

The data is loaded only when needed, but is not deleted (ever).

The Problem

The grid-part is used to cache the requested grid-functions and it's the only place where the data is kept.

The Solution

Generate a grid-part for each time-step

Each time step has a grid-part instance, that refers topology, geometry and grid-functions. These referred entities must be cached. The grid-part is only a shell that kept the actual data together.

What are cached?

The topology, geometry and grid-functions are cached in the source-process

Who is using the cache?

The final processes, such as the coloring process. They must act directly in the grid-part's grid-function to increment/decrement the reference count properly.

We must use a "reference count" for each cached object. If the reference reach zero it is possible to remove it from the memory (delete it). The criteria for deleting a object is defined by the cache mechanism.

Leave a comment