-
Notifications
You must be signed in to change notification settings - Fork 12
Notes on caching translated attributes
Stephan and John 15 Dec 2021.
Can cache everything because the contents of the original container are unchanged.
Need forward and inverse translations.
We will say that translations have local effects when adding/changing an attribute changes only one node of the container tree. If that is the case, attribute writing can be implemented as follows:
- Create sparse N5 sub-tree with attribute
- inverse translate sparse N5 tree.
- write elements of the result
In the general case, translations can be such that what paths are affected / written to can depend on attributes. Then attribute writing must be implemented like this:
- Read full N5 Tree
- Translate full N5 Tree
- modify attribute
- inverse translate full N5 Tree
- write full N5 Tree
This general case is terrible because any attribute change could have arbitrarily wide-ranging effects on other paths and attributes.
Have a convention for translation such that any translation with non-local effects must write a temporary attribute that indicates the paths that are or can be affected by a write to an attribute at a path. Effectively, it must provide
- temporary attributes are written to the translated / inverse translated (?) tree but will not be written to the "actual" container.