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

Conversation

@alcortesm
Copy link
Contributor

Changes Tree.Entries from an slice to a map, so we can search in O(1) instead of in O(n).

Commit.File() was leaking a goroutine because it was looping over
an iterator without closing its channel.

Now commit.File() calls the new Tree.File() method that searches
the file in the repository by trasversing the dir tree instead
of using the tree.Files() iterator.

This not only prevent the goroutine leak, but also speeds up
file searching.
@codecov-io
Copy link

Current coverage is 69.56%

Merging #15 into master will increase coverage by +1.19% as of 321a551

@@            master     #15   diff @@
======================================
  Files           17      17       
  Stmts         1208    1255    +47
  Branches       192     199     +7
  Methods          0       0       
======================================
+ Hit            826     873    +47
  Partial         93      93       
  Missed         289     289       

Review entire Coverage Diff as of 321a551

Powered by Codecov. Updated on successful CI builds.

@toqueteos
Copy link
Contributor

LGTM

mcuadros added a commit that referenced this pull request Jan 21, 2016
@mcuadros mcuadros merged commit 48efd20 into src-d:master Jan 21, 2016
@alcortesm alcortesm deleted the performance-increase-for-big-repos branch January 21, 2016 13:40
mcuadros added a commit that referenced this pull request Jan 31, 2017
gsalingu-ovhus pushed a commit to gsalingu-ovhus/go-git that referenced this pull request Mar 28, 2019
Replace homemade yubikey validation with yubigo library
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants