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

Memory optimization internal blacklist/whitelist cache (#513) #514

Merged
merged 1 commit into from
May 12, 2022

Conversation

0xERR0R
Copy link
Owner

@0xERR0R 0xERR0R commented May 12, 2022

  • removed temporary map which was used to eliminate duplicates
  • removed temporary step to create a sorted slice

Benchmark before/after:

# before
BenchmarkStringCache-16   282   4215279 ns/op   2319853 B/op   10862 allocs/op

# after
BenchmarkStringCache-16   310   3751947 ns/op    796616 B/op   10271 allocs/op

closes #513

@0xERR0R 0xERR0R added this to the 0.19 milestone May 12, 2022
@0xERR0R 0xERR0R added the 🔨 enhancement New feature or request label May 12, 2022
@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #514 (9a5e3d5) into development (651ab87) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@               Coverage Diff               @@
##           development     #514      +/-   ##
===============================================
- Coverage        93.84%   93.83%   -0.01%     
===============================================
  Files               36       36              
  Lines             3085     3081       -4     
===============================================
- Hits              2895     2891       -4     
  Misses             142      142              
  Partials            48       48              
Impacted Files Coverage Δ
util/common.go 97.87% <ø> (-0.30%) ⬇️
cache/stringcache/string_caches.go 100.00% <100.00%> (ø)

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 651ab87...9a5e3d5. Read the comment docs.

@0xERR0R 0xERR0R merged commit 6772438 into development May 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the string-cache-memory-optimization branch May 12, 2022 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory optimization internal blacklist/whitelist cache
1 participant