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

Cheaper calculation of flushes. #264

Merged
merged 1 commit into from
Nov 30, 2020

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented Nov 30, 2020

Motivation:

The outbound flow control buffer currently does a linear scan through
the pending data objects to work out how many bytes were buffered. Let's
burn an integer and just calculate these on the way in, making flushes
way cheaper.

Modifications:

  • Update the number of bytes when we buffer the write, and make flushes
    cheaper.

Result:

Moderate performance improvement in high throughput server benchmarks
(around 4%).

Motivation:

The outbound flow control buffer currently does a linear scan through
the pending data objects to work out how many bytes were buffered. Let's
burn an integer and just calculate these on the way in, making flushes
way cheaper.

Modifications:

- Update the number of bytes when we buffer the write, and make flushes
  cheaper.

Result:

Moderate performance improvement in high throughput server benchmarks
(around 4%).
@Lukasa Lukasa added kind/enhancement Improvements to existing feature. 🔨 semver/patch No public API change. labels Nov 30, 2020
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@Lukasa Lukasa merged commit 2f3c6e7 into apple:main Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements to existing feature. 🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants