feat: speed up outgoing packet writer by bdraco · Pull Request #1313 · python-zeroconf/python-zeroconf

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@bdraco

Copy link Copy Markdown

Member

@bdraco bdraco commented

Nov 13, 2023

edited

Loading

  • refactor the loop to only call _has_more_to_add once per loop when its a query
  • add some more cython types
  • cache common shorts

This is a ~22% speed up

refactor the loop to only call _has_more_to_add once per loop when
its a query

@codecov

Copy link Copy Markdown

codecov bot commented

Nov 13, 2023

edited

Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
src/zeroconf/__init__.py 100.00% <100.00%> (ø)
src/zeroconf/_protocol/outgoing.py 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!

@bdraco bdraco marked this pull request as ready for review

November 13, 2023 19:26

@bdraco bdraco merged commit 55cf4cc into master

Nov 13, 2023

@bdraco bdraco deleted the refactor_packets branch

November 13, 2023 19:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@bdraco