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

Rate limit the number of outgoing gRPC messages #1759

Merged
merged 2 commits into from
Jun 17, 2022

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 14, 2022

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?
This change should allow a better buffering of the outgoing gRPC messages (fewer messages with bigger data blocks -> less fragmentation). This should allow the clients (IDE) to better handle incoming data.

What is the current behavior?
In particular on Windows, the output of the compile commands may be very fragmented, leading to a lot of small gRPC messages each one transporting just a single o few bytes.

What is the new behavior?
Messages are buffered and sent every 50 ms (unless an higher throughput is required).

Does this PR introduce a breaking change, and is titled accordingly?
No

This change should allow a better buffering of the outgoing gRPC
messages (less messages with bigger data blocks -> less fragmentation).
This should allow the clients (IDE) to better handle incoming data.
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface labels Jun 14, 2022
@cmaglie cmaglie self-assigned this Jun 15, 2022
@cmaglie cmaglie requested a review from a team June 15, 2022 11:52
@cmaglie
Copy link
Member Author

cmaglie commented Jun 15, 2022

This should be an alternative solution to arduino/arduino-ide#1058, would be nice to test it without that patch.

arduino/utils/stream.go Outdated Show resolved Hide resolved
Co-authored-by: Umberto Baldi <[email protected]>
@cmaglie cmaglie merged commit 64bc4dc into arduino:master Jun 17, 2022
@cmaglie cmaglie deleted the rate_limit_data_streams branch June 17, 2022 10:17
@cmaglie cmaglie added this to the arduino-cli 0.24.0 milestone Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants