Skip to content

v1.5.56

@xtaci xtaci tagged this 09 Feb 07:37
Add windowUpdateThreshold field to stream struct to cache the
MaxStreamBuffer/2 calculation. This avoids repeated pointer
dereferences (s.sess.config.MaxStreamBuffer) and integer division
on every tryReadV2() and writeToV2() call in the hot path.

- Add windowUpdateThreshold uint32 field to stream struct
- Initialize threshold in newStream()
- Use cached value in tryReadV2() and writeToV2()
Assets 2
Loading