Skip to content

feat: speed up adding and expiring records in the DNSCache#1490

Merged
bdraco merged 4 commits into
masterfrom
speed_up_adding_records_to_cache
Jan 22, 2025
Merged

feat: speed up adding and expiring records in the DNSCache#1490
bdraco merged 4 commits into
masterfrom
speed_up_adding_records_to_cache

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented Jan 22, 2025

Small performance improvement based on what was slow in the benchmark

  • adds: avoid creating an empty dict
  • expire: add some missing types to avoid some checks

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.78%. Comparing base (854fef6) to head (e7efb1a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1490   +/-   ##
=======================================
  Coverage   99.78%   99.78%           
=======================================
  Files          30       30           
  Lines        3311     3316    +5     
  Branches      453      455    +2     
=======================================
+ Hits         3304     3309    +5     
  Misses          5        5           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jan 22, 2025

CodSpeed Performance Report

Merging #1490 will improve performances by 8.19%

Comparing speed_up_adding_records_to_cache (e7efb1a) with master (854fef6)

Summary

⚡ 1 improvements
✅ 5 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_expire_no_records_to_expire 18.4 µs 17.1 µs +8.19%

@bdraco bdraco changed the title feat: speed up adding records to the DNSCache feat: speed up adding and expiring records in the DNSCache Jan 22, 2025
@bdraco bdraco marked this pull request as ready for review January 22, 2025 22:23
@bdraco bdraco merged commit 628b136 into master Jan 22, 2025
@bdraco bdraco deleted the speed_up_adding_records_to_cache branch January 22, 2025 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant