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

Add support for orjson #412

Merged
merged 6 commits into from
Jun 28, 2022
Merged

Add support for orjson #412

merged 6 commits into from
Jun 28, 2022

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Jun 13, 2022

  • orjson is now used. As Home Assistant has added
    support
    for it, it will automatically be used when HAP-python
    is used with HA

  • python's built in json is much slower and this improves the reconnect time when switching from out of home to home, and helps reduce the risk we will hit the lower timeouts in iOS 16 and have the bridge go unavailable on slower platforms

@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #412 (f6e2ff0) into dev (519f22f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #412   +/-   ##
=======================================
  Coverage   91.78%   91.78%           
=======================================
  Files          20       20           
  Lines        2118     2119    +1     
  Branches      287      287           
=======================================
+ Hits         1944     1945    +1     
  Misses        132      132           
  Partials       42       42           
Impacted Files Coverage Δ
pyhap/hap_handler.py 81.57% <100.00%> (-0.05%) ⬇️
pyhap/util.py 100.00% <100.00%> (ø)

@bdraco bdraco force-pushed the orjson_support branch 3 times, most recently from ce559bb to d0ff5bd Compare June 13, 2022 08:15
@bdraco bdraco marked this pull request as ready for review June 14, 2022 01:01
pyhap/util.py Outdated Show resolved Hide resolved
bdraco added 4 commits June 27, 2022 09:25
- orjson is used if its available. As Home Assistant is adding
  support for it, it will automaticlly be used when HAP-python
  is used with HA
@bdraco bdraco closed this Jun 27, 2022
@bdraco bdraco reopened this Jun 27, 2022
@bdraco
Copy link
Contributor Author

bdraco commented Jun 27, 2022

Retesting now

@bdraco
Copy link
Contributor Author

bdraco commented Jun 27, 2022

Manual testing looks good 👍

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