This hasn't come up too often, but a user with a Git repository that has ~1.5K branches and ~55K commits required a very long time for initial discovery. The way the algorithm works means that we'll do O(1500 * 55000) commits worth of work in this case before beginning inserts. Particularly, the cache is a level above this section of the code.
Fixing this is potentially somewhat tricky, but I think we can use the working set like a cache. If that pans out, that should be an easy fix.
A workaround is to set "Track Only" to one branch, discover, fix "Track Only", then start the daemons. This discovers one branch first, then the rest can hit the cache.