charslaw / Pando

Pando serializes and tracks the history of a state tree
MIT License
2 stars 0 forks source link

Optimize performance of generated NodeSizeForObject function when the size can be known at compile time #61

Open schultzcole opened 2 years ago

schultzcole commented 2 years ago

When we know at compile time that the size of the results produced by a given size is static, we should just use the static value. This occurs when all of the children of a node are also nodes, because each child is stored in the parent node as a fixed-size hash id.