Skip to content

Improve speed websocket sends messages#27295

Merged
balloob merged 2 commits into
devfrom
slightly-faster-ws-send
Oct 8, 2019
Merged

Improve speed websocket sends messages#27295
balloob merged 2 commits into
devfrom
slightly-faster-ws-send

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Oct 7, 2019

Description:

Based on the implementation of websocket_client.send_json we can just use send_str, which saves us an await. This makes sending data slightly faster.

Related issue (if applicable): zachowj/node-red-contrib-home-assistant-websocket#153

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]

@balloob balloob requested a review from a team as a code owner October 7, 2019 18:21
@balloob balloob added this to the 0.100 milestone Oct 7, 2019
@balloob balloob merged commit c9e26b6 into dev Oct 8, 2019
@delete-merged-branch delete-merged-branch Bot deleted the slightly-faster-ws-send branch October 8, 2019 03:08
balloob added a commit that referenced this pull request Oct 8, 2019
* Improve speed websocket sends messages

* return -> continue
@lock lock Bot locked and limited conversation to collaborators Oct 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants