Follow-up from "New InputCopyStream"
The following discussions from !1077 (merged) should be addressed:
-
@graven started a discussion: (+1 comment) Why not just drop this
if
? If the vetolist is empty, then thefind
becomes a no-operation, and at least the behaviour for the other case remains the same -- i.e. right now the behaviour between an 'empty' list and a list with one entry which would never be matched would be different, as there is not just a check whether entries are in the vetolist, but also the preconditionsi && i->registry()
are applied... -
@graven started a discussion: (+2 comments) why first write into
filteredLeaves
, and then assign tom_objects
, and not clearm_objects
followed by directly writing intom_objects
? -
@graven started a discussion: (+1 comment) Given that you will (potentially) be matching lots of times against values in this vector, is a vector, and the implied linear search, the best data structure? Would something like an
unordered_set<std::string>
not be more appropriate? Or at least a sorted vector, in which case the search goes from O(N) to O(log(N))? (in which case you could add an update handler to the property to keep it sorted on changes, and do anstd::binary_search
instead ofstd::find
)