There is a Tree with lot of nodes and it goes through, say 4 phases of processing.
In one particular phase, say phase 3, I need few extra properties(integers) to do the required processing.
I am not the creator of the Tree Node classes so I don't want to modify the class and add those properties. besides, those properties are very specific to Phase 3.
What is the best approach I can do to "add" these properties? It will be way too complicated if I wrap every node with a wrapper class, because i have to maintain a dictionary of [NodeID-> Wrapped Node] which is very performance intensive approach. It can easily have 300k nodes so a dictionary can easily go out of memory.
What other approach can I use to solve this problem?