refs: use dulwich function for loading refs
Timing using the Tryton repository, with more than 9000 remote refs, shows negligible differences, with performance regressing to about 0.000960s from about 0.000820s. That is acceptable.
The comment which says it took way too long is probably based on the
fact that the old code didn't use subkeys()
, and thus always loaded
all refs. As an added bonus, subkey()
supports packed refs as well.