git_handler: don't compute tags for each tag imported
Previously we'd recompute the repo tags each time we'd consider importing a Git tag. This is O(n^2) in the number of tags and produced noticeable slowdowns in repos with large numbers of tags. To fix this, compute the tags just once. This is correct because the only case where we'd have issues is if multiple new Git tags with the same name were introduced, which can't happen because Git tags cannot share names. For a repository with over 200 tags, this causes a no-op hg pull to be sped up by around 0.5 seconds.
Loading
Please register or sign in to comment