hpi-swa/vivide

Optimize #hasChildren in model via custom output buffer

marceltaeumel opened this issue · 0 comments

At the moment, a model node can only answer the "Have you children?" question by computing all its children. However, we could use a collection that throws an exception whenever the first insert happens.

Not sure whether it is a good idea to cancel such processing every time... thinking of:

[:in :out | in do: [:each |
   each open.
   out add: each next.
   "Next line would be omitted for the #hasChildren check..."
   each close]].

Yet, the use of [] ensure: [] would make this work...