"toListOrderedByDependencies" - ok.
" just skipping projects you've already seen" - that would mean (1) I would have to check for the project in the result list (2) I would have to iterate each time over the entire big initial set just to skip most its elements. This two points will multiply the number of required operations by set.size() and make this method again unacceptably time consuming. It is efficient now as is!