Multiple components subscribing to different subsets

I have two collections, call them ‘parents’ and ‘children’. Each ‘child’ refers to one ‘parent’.

  • parent_1
    • child_A
    • child_D
  • parent_2
    • child B
    • child C

One way to handle this is to publish / subscribe both collections and then filter in the renderChildren method of each component (or the renderOneParent method and pass a filtered list), but this seems like it could involve O(n^2) filtering as parent and child get large. Is there a sensible way to make the component that renders each parent subscribe to a filtered set of children, or am I approaching the problem in the wrong way?