Commit graph

5 commits

Author SHA1 Message Date
Danil Chapovalov
17f783eee8 Skip trimming packet arrival history at the beginning
PacketArrivalMap explicitly doesn't promise packet at the beginning
of it is received. Ensuring that property is wasteful

Bug: chromium:1382563
Change-Id: Ifc898b7ec2bc7a302af8dcfd233e0c598f62db95
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290501
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39083}
2023-01-12 11:59:27 +00:00
Danil Chapovalov
ea59abe44e Speed up congestion controller feedback fuzzer
When packet arrives with large gap majority of the time could be spend
in finding next received packet. Embedding such search into PacketArrivalMap
makes it faster

Bug: chromium:1373414
Change-Id: I2e0be0f2fc4ea96af081531d575a17c70b72b25b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279881
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38459}
2022-10-24 13:43:16 +00:00
Danil Chapovalov
7f0a7acb0a Improve PacketArrivalTimeMap perfomance
replace std::deque implementation with a manually controlled circular buffer.
replace Timestamp validity check from 'IsInfinite()' accesser to cheaper comparison to zero.
These greatly increase PacketArrivalTimeMap::AddPacket perfomance when packet arrive with large sequence number gaps.

Bug: chromium:1349880
Change-Id: I6f4e814b1086ca9d0b48608531e3a387d9e542dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270564
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37722}
2022-08-09 13:31:20 +00:00
Danil Chapovalov
1220855430 In RemoteEstimatorProxy use Timestamp type
to assemble rtcp::TransportFeedback

Bug: webrtc:13757
Change-Id: I668d9e61d82b454a6884eff223804afc882d86a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264900
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37192}
2022-06-13 10:07:46 +00:00
Victor Boivie
ae1f8f59ac Use a std::deque in RemoteEstimatorProxy
Before this CL, the RemoteEstimatorProxy used a std::map to track which
arrival time a packet with a certain sequence number was received at.
While this works, it's fairly slow as most manipulations and insertions
are O(log(N)) and there were quite many of them.

By taking advantage that sequence numbers generally are received in
sequence, recording a packet is now amortized O(1). Also other
operations such as creating the periodic feedback reports, are also
much faster as it previously was done by searching quite a few times
in that map.

In highly loaded Media Servers, RemoteEstimatorProxy's usage of
std::map attributes to around 0.52% CPU.

Bug: webrtc:12689
Change-Id: I3dd58105f9fbfb111f176833cd4aa6b040c0e01d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217388
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33979}
2021-05-11 10:19:06 +00:00