For infinitely deep search spaces (or just large ones) a depth limit can be set.
Excerpt modified from University of Edinburgh
A DFS starting at some vertex
explores the graph by building up a tree that contains all vertices that are reachable from and all edges that are used to reach these vertices. We call this tree a DFS tree. A complete DFS exploring the full graph (not only the part reachable from the given vertex
) builds up a collection of trees (trees reachable from various starting points), or a forest, called a "DFS forest".
A DFS-Forest Component then is simply one Strongly Connected tree inside of this forest. See: StackOverflow