mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 11:22:38 +01:00
code review: lower timer delay = less risk of large backlog
This commit is contained in:
parent
07d1d6819a
commit
2db377f577
@ -153,7 +153,7 @@ vAPI.SafeAnimationFrame.prototype = {
|
|||||||
this.fid = requestAnimationFrame(this.callback);
|
this.fid = requestAnimationFrame(this.callback);
|
||||||
}
|
}
|
||||||
if ( this.tid === null ) {
|
if ( this.tid === null ) {
|
||||||
this.tid = vAPI.setTimeout(this.callback, 1200000);
|
this.tid = vAPI.setTimeout(this.callback, 20000);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -590,7 +590,7 @@ vAPI.DOMFilterer = (function() {
|
|||||||
entry, nodes, i, node;
|
entry, nodes, i, node;
|
||||||
|
|
||||||
if ( this.addedSelectors.size !== 0 ) {
|
if ( this.addedSelectors.size !== 0 ) {
|
||||||
//console.time('procedural filterset changed');
|
//console.time('procedural selectors/filterset changed');
|
||||||
for ( entry of this.addedSelectors ) {
|
for ( entry of this.addedSelectors ) {
|
||||||
nodes = entry[1].exec();
|
nodes = entry[1].exec();
|
||||||
i = nodes.length;
|
i = nodes.length;
|
||||||
@ -601,11 +601,11 @@ vAPI.DOMFilterer = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.addedSelectors.clear();
|
this.addedSelectors.clear();
|
||||||
//console.timeEnd('procedural filterset changed');
|
//console.timeEnd('procedural selectors/filterset changed');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.time('dom layout changed/procedural selectors');
|
//console.time('procedural selectors/dom layout changed');
|
||||||
|
|
||||||
this.addedNodes = this.removedNodes = false;
|
this.addedNodes = this.removedNodes = false;
|
||||||
|
|
||||||
@ -644,7 +644,7 @@ vAPI.DOMFilterer = (function() {
|
|||||||
|
|
||||||
this.currentResultset = afterResultset;
|
this.currentResultset = afterResultset;
|
||||||
|
|
||||||
//console.timeEnd('dom layout changed/procedural selectors');
|
//console.timeEnd('procedural selectors/dom layout changed');
|
||||||
},
|
},
|
||||||
|
|
||||||
createProceduralFilter: function(o) {
|
createProceduralFilter: function(o) {
|
||||||
|
Loading…
Reference in New Issue
Block a user