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;
|
||||
|
||||
const onDone = ( ) => {
|
||||
const td = Date.now() - t0;
|
||||
ubolog(`loadFilterLists() took ${td} ms`);
|
||||
ubolog(`loadFilterLists() All filters in memory at ${Date.now() - t0} ms`);
|
||||
|
||||
staticNetFilteringEngine.freeze();
|
||||
staticExtFilteringEngine.freeze();
|
||||
|
@ -859,14 +858,16 @@ onBroadcast(msg => {
|
|||
vAPI.net.unsuspend();
|
||||
filteringBehaviorChanged();
|
||||
|
||||
vAPI.storage.set({ 'availableFilterLists': µb.availableFilterLists });
|
||||
ubolog(`loadFilterLists() All filters ready at ${Date.now() - t0} ms`);
|
||||
|
||||
logger.writeOne({
|
||||
realm: 'message',
|
||||
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({
|
||||
what: 'staticFilteringDataChanged',
|
||||
parseCosmeticFilters: µb.userSettings.parseAllABPHideFilters,
|
||||
|
@ -882,6 +883,7 @@ onBroadcast(msg => {
|
|||
};
|
||||
|
||||
const applyCompiledFilters = (assetKey, compiled) => {
|
||||
ubolog(`loadFilterLists() Loading filters from ${assetKey} at ${Date.now() - t0} ms`);
|
||||
const snfe = staticNetFilteringEngine;
|
||||
const sxfe = staticExtFilteringEngine;
|
||||
let acceptedCount = snfe.acceptedCount + sxfe.acceptedCount;
|
||||
|
@ -915,6 +917,8 @@ onBroadcast(msg => {
|
|||
µb.selfieManager.destroy();
|
||||
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
|
||||
// because it *may* happens that some load operations are synchronous:
|
||||
// This happens for assets which do not exist, or assets with no
|
||||
|
@ -950,6 +954,7 @@ onBroadcast(msg => {
|
|||
|
||||
µb.loadFilterLists = function() {
|
||||
if ( loadingPromise instanceof Promise ) { return loadingPromise; }
|
||||
ubolog('loadFilterLists() Start');
|
||||
t0 = Date.now();
|
||||
loadedListKeys.length = 0;
|
||||
loadingPromise = Promise.all([
|
||||
|
|
Loading…
Reference in New Issue