This note describes fast algorithms for computing the prime factors of connected, nonbipartite graphs with respect to the direct product, and of connected graphs with respect to the strong product. The complexities are O(mmin(n,∆)) for the direct product, and O(ma(G)∆) for the strong, where n is the order of the graph G to be factored, m its size, a(G) its arboricity, and ∆ its maximum degree. ...