speed up DfsSolver