Would a simple DFS suffice (and be performant)?