mirror of https://github.com/gorhill/uBlock.git
Add trace information to console
This commit is contained in:
parent
8be8ac57a7
commit
f200bbf5d5
|
@ -850,8 +850,7 @@ onBroadcast(msg => {
|
||||||
let t0 = 0;
|
let t0 = 0;
|
||||||
|
|
||||||
const onDone = ( ) => {
|
const onDone = ( ) => {
|
||||||
const td = Date.now() - t0;
|
ubolog(`loadFilterLists() All filters in memory at ${Date.now() - t0} ms`);
|
||||||
ubolog(`loadFilterLists() took ${td} ms`);
|
|
||||||
|
|
||||||
staticNetFilteringEngine.freeze();
|
staticNetFilteringEngine.freeze();
|
||||||
staticExtFilteringEngine.freeze();
|
staticExtFilteringEngine.freeze();
|
||||||
|
@ -859,14 +858,16 @@ onBroadcast(msg => {
|
||||||
vAPI.net.unsuspend();
|
vAPI.net.unsuspend();
|
||||||
filteringBehaviorChanged();
|
filteringBehaviorChanged();
|
||||||
|
|
||||||
vAPI.storage.set({ 'availableFilterLists': µb.availableFilterLists });
|
ubolog(`loadFilterLists() All filters ready at ${Date.now() - t0} ms`);
|
||||||
|
|
||||||
logger.writeOne({
|
logger.writeOne({
|
||||||
realm: 'message',
|
realm: 'message',
|
||||||
type: 'info',
|
type: 'info',
|
||||||
text: `Reloading all filter lists: done, took ${td} ms`
|
text: `Reloading all filter lists: done, took ${Date.now() - t0} ms`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
vAPI.storage.set({ 'availableFilterLists': µb.availableFilterLists });
|
||||||
|
|
||||||
broadcast({
|
broadcast({
|
||||||
what: 'staticFilteringDataChanged',
|
what: 'staticFilteringDataChanged',
|
||||||
parseCosmeticFilters: µb.userSettings.parseAllABPHideFilters,
|
parseCosmeticFilters: µb.userSettings.parseAllABPHideFilters,
|
||||||
|
@ -882,6 +883,7 @@ onBroadcast(msg => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const applyCompiledFilters = (assetKey, compiled) => {
|
const applyCompiledFilters = (assetKey, compiled) => {
|
||||||
|
ubolog(`loadFilterLists() Loading filters from ${assetKey} at ${Date.now() - t0} ms`);
|
||||||
const snfe = staticNetFilteringEngine;
|
const snfe = staticNetFilteringEngine;
|
||||||
const sxfe = staticExtFilteringEngine;
|
const sxfe = staticExtFilteringEngine;
|
||||||
let acceptedCount = snfe.acceptedCount + sxfe.acceptedCount;
|
let acceptedCount = snfe.acceptedCount + sxfe.acceptedCount;
|
||||||
|
@ -915,6 +917,8 @@ onBroadcast(msg => {
|
||||||
µb.selfieManager.destroy();
|
µb.selfieManager.destroy();
|
||||||
staticFilteringReverseLookup.resetLists();
|
staticFilteringReverseLookup.resetLists();
|
||||||
|
|
||||||
|
ubolog(`loadFilterLists() All filters removed at ${Date.now() - t0} ms`);
|
||||||
|
|
||||||
// We need to build a complete list of assets to pull first: this is
|
// We need to build a complete list of assets to pull first: this is
|
||||||
// because it *may* happens that some load operations are synchronous:
|
// because it *may* happens that some load operations are synchronous:
|
||||||
// This happens for assets which do not exist, or assets with no
|
// This happens for assets which do not exist, or assets with no
|
||||||
|
@ -950,6 +954,7 @@ onBroadcast(msg => {
|
||||||
|
|
||||||
µb.loadFilterLists = function() {
|
µb.loadFilterLists = function() {
|
||||||
if ( loadingPromise instanceof Promise ) { return loadingPromise; }
|
if ( loadingPromise instanceof Promise ) { return loadingPromise; }
|
||||||
|
ubolog('loadFilterLists() Start');
|
||||||
t0 = Date.now();
|
t0 = Date.now();
|
||||||
loadedListKeys.length = 0;
|
loadedListKeys.length = 0;
|
||||||
loadingPromise = Promise.all([
|
loadingPromise = Promise.all([
|
||||||
|
|
Loading…
Reference in New Issue