Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log_subtree_cache: Use compact Range instead of Tree #1609

Merged
merged 2 commits into from
May 16, 2019

Conversation

pav-kv
Copy link
Contributor

@pav-kv pav-kv commented May 16, 2019

This change removes another dependency from compact.Tree type.
It also makes log subtree cache population 3x faster.

Benchmarks

Before:	BenchmarkRepopulateLogSubtree-12	1000	2202388 ns/op
After:	BenchmarkRepopulateLogSubtree-12	2000	738378 ns/op

@pav-kv pav-kv requested a review from AlCutter May 16, 2019 13:47
@codecov
Copy link

codecov bot commented May 16, 2019

Codecov Report

Merging #1609 into master will increase coverage by <.01%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1609      +/-   ##
==========================================
+ Coverage   67.13%   67.14%   +<.01%     
==========================================
  Files         110      110              
  Lines        8962     8963       +1     
==========================================
+ Hits         6017     6018       +1     
  Misses       2341     2341              
  Partials      604      604
Impacted Files Coverage Δ
storage/cache/log_subtree_cache.go 51.02% <60%> (+1.02%) ⬆️

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 8a96488...6c136e8. Read the comment docs.

@pav-kv pav-kv merged commit 2ab97c7 into google:master May 16, 2019
@pav-kv pav-kv deleted the use_compact_range_in_cache branch May 16, 2019 14:03
gdbelvin added a commit that referenced this pull request May 17, 2019
* master: (54 commits)
  Couple of changes to make NodeIDs more frugal. (#1613)
  compact.Tree: Change semantic of adding leaves (#1592)
  MapHasher: Do not return error from HashLeaf (#1611)
  Move Postgres schema into "schema" subdirectory
  Move MySQL schema into "schema" subdirectory
  Improve FlipRightBit by doing it directly. (#1610)
  log_subtree_cache: Use compact Range instead of Tree (#1609)
  LogHasher: Return no error from HashLeaf method (#1608)
  Remove update_changelog.sh
  Fewer copies of the bytes from big.Int (#1602)
  Switch some low-level logging in hashing related code to 'if' guards (#1601)
  Merge pull request #1596 from RJPercival/del_dockerfile_db
  Correct name of "licenses" binary in .gitignore
  compact.Tree: Allow nil visitor and add benchmarks (#1599)
  Add timeout to sequencing context (#1595)
  Combine `go install` commands in .travis.yml
  Combine `go get` commands in .travis.yml
  Sort `go get` commands in .travis.yml
  Rename "indirect/external.go" to "indirect/indirect.go"
  Fix typo: "TestLibaries" -> "TestLibraries"
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants