Inline dfs in components for 1.4x speedup