never recompute the same node again, ie topological sort equivalent