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

feat: speed up the new parse_advertisement_data_tuple function #26

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Aug 23, 2023

This is technically a breaking change to only allow incoming data to be a tuple, but since its new (less than 2 weeks old) and only in HA dev, and likely only HA is using it, I did not bump the major version.

Before

Parsing 100000 bluetooth messages took 0.047129874998063315 seconds
Parsing 100000 bluetooth messages took 0.04788412500056438 seconds
Parsing 100000 bluetooth messages took 0.048007541001425125 seconds

After

Parsing 100000 bluetooth messages took 0.0215528330008965 seconds
Parsing 100000 bluetooth messages took 0.022052750002330868 seconds
Parsing 100000 bluetooth messages took 0.02225575000193203 seconds

This is technically a breaking change to only allow
incoming data to be a tuple, but since its new and
likely only HA is using it, I did not bump the major version
@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% ⚠️

Comparison is base (1a07397) 99.45% compared to head (e2eec7d) 99.44%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
- Coverage   99.45%   99.44%   -0.01%     
==========================================
  Files           3        3              
  Lines         182      180       -2     
  Branches       26       25       -1     
==========================================
- Hits          181      179       -2     
  Misses          1        1              
Files Changed Coverage Δ
src/bluetooth_data_tools/__init__.py 100.00% <100.00%> (ø)
src/bluetooth_data_tools/gap.py 100.00% <100.00%> (ø)

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

@bdraco bdraco marked this pull request as ready for review August 23, 2023 22:16
@bdraco bdraco merged commit 1137a50 into main Aug 23, 2023
19 checks passed
@bdraco bdraco deleted the simplify branch August 23, 2023 22:16
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.

None yet

1 participant