Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

remote: iterate over references only once #580

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

erizocosmico
Copy link
Contributor

In a push local references would be iterated one time per pushed reference, that gets super expensive as the number of references increases, since every time we iterate over all references, they're read from the disk. Instead of that, we calculate the refs ahead of time and send them down the line to all the functions that need them.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico erizocosmico changed the title remote: iterate over reference only once remote: iterate over references only once Sep 5, 2017
@codecov
Copy link

codecov bot commented Sep 5, 2017

Codecov Report

Merging #580 into master will decrease coverage by 0.59%.
The diff coverage is 81.25%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #580     +/-   ##
=========================================
- Coverage   78.04%   77.45%   -0.6%     
=========================================
  Files         129      129             
  Lines        9953     9963     +10     
=========================================
- Hits         7768     7717     -51     
- Misses       1340     1413     +73     
+ Partials      845      833     -12
Impacted Files Coverage Δ
remote.go 74.58% <81.25%> (+0.13%) ⬆️
plumbing/transport/ssh/common.go 20.54% <0%> (-45.21%) ⬇️
plumbing/transport/ssh/auth_method.go 31.57% <0%> (-22.81%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9a1c7a...1c2fb31. Read the comment docs.

@mcuadros mcuadros merged commit 2dc59a6 into src-d:master Sep 5, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants