1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00

Fine tune code of optimizeOriginHitTests()

Related commit:
- b265f2644d
This commit is contained in:
Raymond Hill 2020-11-14 07:28:51 -05:00
parent 4afb3dc149
commit 5cf9bcf27c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -2256,7 +2256,10 @@ const FilterBucket = class extends FilterCollection {
const f = filterUnits[iunit];
if ( f.hasOriginHit === true ) {
domainOpts.push(f.domainOpt);
bucket.unshift(iunit);
// move the sequence slot to new bucket
filterSequences[i+1] = bucket.i;
bucket.i = i;
bucket.n += 1;
if ( iprev !== 0 ) {
filterSequences[iprev+1] = inext;
} else {
@ -3226,7 +3229,7 @@ FilterContainer.prototype.freeze = function() {
this.optimizeTimerId = self.requestIdleCallback(( ) => {
this.optimizeTimerId = undefined;
this.optimize();
}, { timeout: 15000 });
}, { timeout: 10000 });
log.info(`staticNetFilteringEngine.freeze() took ${Date.now()-t0} ms`);
};