Skip to content

Commit

Permalink
Revert "Make bandwidth estimator cache friendly."
Browse files Browse the repository at this point in the history
This reverts commit 60d2944.

Closes #367
Reopens #324

Change-Id: I4302469a319b30f1ce502554348fd69726a50c58
  • Loading branch information
joeyparrish committed May 5, 2016
1 parent acfb7c6 commit 9388c1e
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/abr/ewma_bandwidth_estimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ shaka.abr.EwmaBandwidthEstimator = function() {
* @const
*/
this.minBytes_ = 65536;


/**
* Minimum amount of time (in ms), under which samples are discarded.
* @private {number}
* @const
*/
this.minTime_ = 200;
};


Expand All @@ -98,11 +90,7 @@ shaka.abr.EwmaBandwidthEstimator.DEFAULT_ESTIMATE = 5e5; // 500kbps
*/
shaka.abr.EwmaBandwidthEstimator.prototype.sample = function(
durationMs, numBytes) {
// Ignore small requests. This will protect against both caching and
// outliers. Small requests in size will tend to vary a lot in the time they
// take, and overhead of JavaScript timings have a big effect. Also, cached
// responses will always return in a small time.
if (numBytes < this.minBytes_ || durationMs < this.minTime_) {
if (numBytes < this.minBytes_) {
return;
}

Expand Down

0 comments on commit 9388c1e

Please sign in to comment.