I might have understood something wrongly, but to list objects that are
not reachable you need to traverse all trees anyhow, don't you.
Then how big is the difference between a directory and an submodule?
I'd expect it's not so big if the submodules included in different
revisions of the supermodule share most of their history. Of course you
need to exploit that. Thinking again that might be the problem?
Best regards
Uwe
--
Uwe Kleine-K