J
jehugaleahsa
Hello:
I have an internal class of type Node which inherits from NodeBase.
The only difference is that NodeBase has pointers to other NodeBases
and Node has a value associated with it.
Each NodeBase has an array of NodeBases. Occasionally, I want to make
this array grow in size. However, whenever I call
Array.Resize<NodeBase> or Array.Copy there is a huge delay.
I did some profiling and I am really confused. The profiler says that
the majority of time being spent is on an Array.Copy. I have tried
pulling the classes out and testing outside, but I don't experience
the bottleneck. Is there some sort of memory management voodoo going
on causing this delay?
Thanks for any insight or workarounds.
~Travis
I have an internal class of type Node which inherits from NodeBase.
The only difference is that NodeBase has pointers to other NodeBases
and Node has a value associated with it.
Each NodeBase has an array of NodeBases. Occasionally, I want to make
this array grow in size. However, whenever I call
Array.Resize<NodeBase> or Array.Copy there is a huge delay.
I did some profiling and I am really confused. The profiler says that
the majority of time being spent is on an Array.Copy. I have tried
pulling the classes out and testing outside, but I don't experience
the bottleneck. Is there some sort of memory management voodoo going
on causing this delay?
Thanks for any insight or workarounds.
~Travis
