feat: speed up adding and expiring records in the DNSCache by bdraco · Pull Request #1490 · python-zeroconf/python-zeroconf
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 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 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
changed the title
feat: speed up adding records to the DNSCache
feat: speed up adding and expiring records in the DNSCache
bdraco
marked this pull request as ready for review
bdraco
deleted the
speed_up_adding_records_to_cache
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters