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

Streaming perf improv #53

Merged
merged 5 commits into from
Mar 14, 2018
Merged

Streaming perf improv #53

merged 5 commits into from
Mar 14, 2018

Conversation

preetapan
Copy link

@preetapan preetapan commented Dec 19, 2017

Created from PR #50

stuartcarnie and others added 3 commits December 19, 2017 10:49
* flow control was assuming a `Read` consumed the entire buffer
* flow control fix reduces memory utilization when receiving large
  streams of data
* use timer pool to reduce allocations
* use static handler function pointer to avoid closure allocations
  for every frame
stream.go Outdated
@@ -414,7 +423,7 @@ func (s *Stream) readData(hdr header, flags uint16, conn io.Reader) error {
}

// Decrement the receive window
atomic.AddUint32(&s.recvWindow, ^uint32(length-1))
s.recvWindow += ^uint32(length - 1)
Copy link
Contributor

@stuartcarnie stuartcarnie Dec 19, 2017

Choose a reason for hiding this comment

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

Whilst it is the same thing, this is a carry over from the atomic operation. We should change this to read

s.recvWindow -= length

@preetapan preetapan requested a review from slackpad January 18, 2018 21:03
@preetapan
Copy link
Author

Did an offline code review with @dadgar to merge this.

Thanks @stuartcarnie for the great work.

@preetapan preetapan merged commit 2658be1 into master Mar 14, 2018
@preetapan preetapan deleted the streaming_perf_improv branch March 14, 2018 20:11
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