This commit is contained in:
gorhill 2016-06-12 10:51:42 -04:00
parent f902c53be7
commit 758c8afdc7
1 changed files with 2 additions and 2 deletions

View File

@ -1896,7 +1896,7 @@ var httpObserver = {
// the ring buffer are overwritten.
pendingURLToIndex: new Map(),
pendingWritePointer: 0,
pendingRingBuffer: new Array(32),
pendingRingBuffer: new Array(256),
pendingRingBufferInit: function() {
// Use and reuse pre-allocated PendingRequest objects = less memory
// churning.
@ -1923,7 +1923,7 @@ var httpObserver = {
createPendingRequest: function(url) {
var bucket;
var i = this.pendingWritePointer;
this.pendingWritePointer = i + 1 & 31;
this.pendingWritePointer = i + 1 & 255;
var preq = this.pendingRingBuffer[i];
var si = String.fromCharCode(i);
// Cleanup unserviced pending request