Skip to content

Add fast cache lookup functions#732

Merged
bdraco merged 26 commits into
python-zeroconf:masterfrom
bdraco:non_threadsafe_cache_lookups
Jun 19, 2021
Merged

Add fast cache lookup functions#732
bdraco merged 26 commits into
python-zeroconf:masterfrom
bdraco:non_threadsafe_cache_lookups

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented Jun 18, 2021

The majority of our lookups happen in the event loop so there is no need
for them to be threadsafe. Now that the codebase is more clear about what
needs to be threadsafe and what does not need to be threadsafe we can use
the much faster non-threadsafe versions in the places where we are calling
from the event loop.

Supports #720

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 18, 2021

Codecov Report

Merging #732 (d8e2ee8) into master (c035925) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #732      +/-   ##
==========================================
+ Coverage   98.16%   98.17%   +0.01%     
==========================================
  Files          18       18              
  Lines        2176     2197      +21     
  Branches      382      385       +3     
==========================================
+ Hits         2136     2157      +21     
  Misses         25       25              
  Partials       15       15              
Impacted Files Coverage Δ
zeroconf/_cache.py 100.00% <100.00%> (ø)
zeroconf/_core.py 97.86% <100.00%> (ø)
zeroconf/_dns.py 100.00% <100.00%> (ø)
zeroconf/_handlers.py 100.00% <100.00%> (ø)
zeroconf/_services/__init__.py 96.36% <100.00%> (+<0.01%) ⬆️

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 c035925...d8e2ee8. Read the comment docs.

@bdraco bdraco marked this pull request as ready for review June 19, 2021 03:44
@bdraco bdraco merged commit 9d31245 into python-zeroconf:master Jun 19, 2021
@bdraco bdraco deleted the non_threadsafe_cache_lookups branch June 19, 2021 03:44
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.

2 participants