Actyx / banyan

Apache License 2.0
36 stars 3 forks source link

Implement lazy NodeInfo and use it to DRY the 2 iterators #91

Closed rklaehn closed 3 years ago

rklaehn commented 3 years ago

I think we can have 1 iterator to rule them all. The idea is that NodeInfo is quite useful, but currently it has the downside that it is eagerly loading branch and leaf, making it unsuitable for the iterators where lazyness is performance critical.

Have a helper type that is basically a short lived decorated reference and that can be used to comfortably lazy load e.g. a leaf, and use that for everything. Then have a function on the iterator that takes one of these things.