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

Batch messages sent over Comms link #3025

Merged
merged 1 commit into from
Jun 28, 2021
Merged

Batch messages sent over Comms link #3025

merged 1 commit into from
Jun 28, 2021

Conversation

knolleary
Copy link
Member

Proposed changes

Currently, the Comms layer in the runtime will batch up events to send to the editor in a 50ms timer and then send the whole lot in one go. That helps to reduce the work done by not sending each event as its own packet over the websocket.

With the Flow Debugger, it is now possible to get a huge storm of events all queued up to send which get sent in one go. This has the problem of dumping a huge workload on the editor in a single message.

This PR modifies the runtime side of comms to send no more than 50 events per message, with the 50ms pause between message. This should give the editor some breathing space when such storms occur.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@knolleary knolleary added the 2.0 label Jun 16, 2021
@knolleary knolleary merged commit 4f18a5f into dev Jun 28, 2021
@knolleary knolleary deleted the comms-batch branch June 28, 2021 14:28
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