We currently have four slightly different implementations of transformItem:
- VList
- VDataIterator
- VDataTable
- list-items
and three implementations of "selecting items"
- VDataTable (also used by VDataIterator)
- nested
- list-items (used by VSelect etc but not VList)
list-items is the only one that matches object values fast and correctly (#20937)
- VDataTable still has a O(n2)
find() inside map() in transformIn
- VDataTable handles multiple items with the same primitive value but only matches the first item with
return-object
- nested uses a Set to store values so only matches objects by reference
- nested logs a warning if multiple nodes have the same value, and if one is removed from the list then they're all removed from the
nodeIds Set
- VDataTable and nested both ignore
item-value when return-object is set and use the entire object as a value instead
We currently have four slightly different implementations of transformItem:
and three implementations of "selecting items"
list-items is the only one that matches object values fast and correctly (#20937)
find()insidemap()in transformInreturn-objectnodeIdsSetitem-valuewhenreturn-objectis set and use the entire object as a value instead