CanvasBlocker icon indicating copy to clipboard operation
CanvasBlocker copied to clipboard

Persistent high CPU load on some web sites

Open ms1121 opened this issue 8 years ago • 49 comments

While the tab is selected, I am seeing high CPU usage in Firefox on some web sites… as if a thread is remaining active and the process never completes. When I disable CanvasBlocker in about:addons and select the tab again, Firefox CPU loading for the page has returned to its normal idle state.

Example: https://homebiogas.com/

ms1121 avatar Sep 11 '18 20:09 ms1121

How many notifications do you see in the notification popup? grafik

kkapsner avatar Sep 11 '18 21:09 kkapsner

Can you please try the latest Alpha (you have to disable the normal first): https://github.com/kkapsner/CanvasBlocker/releases/tag/0.5.4-Alpha3

kkapsner avatar Sep 13 '18 21:09 kkapsner

Please check https://github.com/kkapsner/CanvasBlocker/releases/tag/0.5.4-Alpha4

kkapsner avatar Sep 16 '18 10:09 kkapsner

Please try 0.5.4: https://github.com/kkapsner/CanvasBlocker/releases/tag/0.5.4

kkapsner avatar Sep 23 '18 11:09 kkapsner

I'm on 0.5.4 and the problem still exists. Here's an address that will produce the problem without fail: https://www.windowscentral.com/how-use-custom-environments-windows-mixed-reality

tavyra avatar Sep 27 '18 23:09 tavyra

Well... this pages requests ~200 DOMRect values per second - it seems that it's the ads. If I simply activate µBlock the number of requested DOMRects and therefore the CPU loads goes down.

As CB fakes this value I'm not surprised that you see an CPU load increase. But there is little I can do about it. I already try to be as efficient as possible.

PS: you will not see the high DOMRect numbers as CB only reports once for requests for the same object.

kkapsner avatar Sep 29 '18 07:09 kkapsner

Can you please check which protection causes the problems on the other pages?

kkapsner avatar Sep 29 '18 21:09 kkapsner

I use ublock origin and umatrix, is there a rule or something I should add to keep this from happening? Disabling CB makes my cpu idle normally but I've only got like 70 notifications from ublock+umatrix+disconnect combined. I'm not sure what the other pages were that ended up freezing firefox and I can't think of any other add-ons that would be interfering.

Not knocking your efficiency either, with the exception of the random page that goes from 5% to 100% like a supercar, I haven't noticed any performance impact.

tavyra avatar Oct 05 '18 20:10 tavyra

I do not know of a specific rule. I also use NoScript which also helps.

With number of notifications I mean the number in the page action popup (see screenshot in first comment).

kkapsner avatar Oct 06 '18 10:10 kkapsner

Can you give an example link for amazon? It runs well for me.

The amiunique thing is known and there is not really anything I can do about it - they use a very poorly written script. You can disable the audio cache temporarily to let it run a little bit faster. But I can tell you that it will say that you are unique... If you want to test if the fingerprint is changing with every load you can use the CB test pages: https://canvasblocker.kkapsner.de/test/

kkapsner avatar Oct 23 '18 21:10 kkapsner

@Leeweez I can't reproduce this issue either.. maybe open a new Issue, to share detailed information about your configurations and console logs?

spodermenpls avatar Oct 24 '18 02:10 spodermenpls

Same for me. Page scrolls fine.

kkapsner avatar Oct 24 '18 18:10 kkapsner

For me, it slows down on amazon when the mouse is on the image product and the zoomed version appears to the right. --EDIT-- You may need to search i also tried to disable the protection for dom api, but it is still slow. the only way to make it fast seems to disable the extension.

kokoko3k avatar Oct 30 '18 13:10 kokoko3k

What do you see in the page action popup: grafik

kkapsner avatar Oct 31 '18 20:10 kkapsner

Sorry for the delay, i see the following: Faked DOMRect readout on www.amazon.it (157)

kokoko3k avatar Nov 05 '18 12:11 kokoko3k

Can you please give me your settings?

kkapsner avatar Nov 09 '18 13:11 kkapsner

Here they are (i've whitelisted amazon)

{
	"logLevel": 1,
	"urlSettings": [
		{
			"url": "www.amazon.it",
			"blockMode": "allowEverything"
		}
	],
	"hiddenSettings": {},
	"expandStatus": {
		"blockMode": true
	},
	"displayHiddenSettings": false,
	"whiteList": "",
	"sessionWhiteList": "",
	"blackList": "",
	"blockMode": "fakeReadout",
	"minFakeSize": 1,
	"maxFakeSize": 0,
	"rng": "nonPersistent",
	"protectedAPIFeatures": {},
	"useCanvasCache": true,
	"ignoreFrequentColors": 0,
	"minColors": 0,
	"fakeAlphaChannel": false,
	"persistentRndStorage": "",
	"persistentIncognitoRndStorage": "",
	"storePersistentRnd": false,
	"persistentRndClearIntervalValue": 0,
	"persistentRndClearIntervalUnit": "days",
	"lastPersistentRndClearing": 1541763252068,
	"askOnlyOnce": "individual",
	"askDenyMode": "block",
	"showCanvasWhileAsking": true,
	"showNotifications": true,
	"highlightPageAction": "none",
	"highlightBrowserAction": "color",
	"displayBadge": true,
	"storeNotificationData": false,
	"storeImageForInspection": false,
	"ignoreList": "",
	"ignoredAPIs": {},
	"showCallingFile": false,
	"showCompleteCallingStack": false,
	"enableStackList": false,
	"stackList": "",
	"protectAudio": true,
	"audioFakeRate": "100",
	"audioNoiseLevel": "minimal",
	"useAudioCache": true,
	"audioUseFixedIndices": true,
	"audioFixedIndices": "11",
	"historyLengthThreshold": 2,
	"protectWindow": false,
	"protectDOMRect": true,
	"domRectIntegerFactor": 4,
	"blockDataURLs": true,
	"displayAdvancedSettings": false,
	"displayDescriptions": false,
	"theme": "default",
	"dontShowOptionsOnUpdate": false,
	"isStillDefault": false,
	"storageVersion": 0.4
}

kokoko3k avatar Nov 09 '18 13:11 kokoko3k

Hm... I do not see anything bad there. Does the problem persist when you disable the DOMRect protection?

kkapsner avatar Nov 10 '18 11:11 kkapsner

Hi, if i disable DOMRect API protection, the problem goes away.

kokoko3k avatar Nov 12 '18 08:11 kokoko3k

Hm... I still cannot reproduce but I recommend that you then only disable the DOMRect API for amazon and not whitelist it completely.

kkapsner avatar Nov 12 '18 20:11 kkapsner