From 131275d6e31974516d2acdf7728e4cbb5e3d2f4a Mon Sep 17 00:00:00 2001 From: krystian3w <35370833+krystian3w@users.noreply.github.com> Date: Tue, 29 Nov 2022 12:33:34 +0100 Subject: [PATCH] recover image form commit ~fb2da45 --- uBlock-vs.-ABP:-efficiency-compared.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/uBlock-vs.-ABP:-efficiency-compared.md b/uBlock-vs.-ABP:-efficiency-compared.md index 4b81135..a7b005d 100644 --- a/uBlock-vs.-ABP:-efficiency-compared.md +++ b/uBlock-vs.-ABP:-efficiency-compared.md @@ -10,10 +10,10 @@ Here is a quick illustrated comparison of efficiency using various angles. Each These screenshots show the memory footprint of Adblock Plus (ABP) and uBlock Origin (uBO) _after_ they have gone through this [demanding benchmark](./Reference-benchmark). Once benchmarking was complete, I forced the browser to garbage collect the memory in each extension by clicking the trash icon (in the dev console) a couple of times. (This is an _important step_, or else the shown memory footprint is not too reliable.) ##### ABP -![ABP](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/abp-own-mem.png) +![ABP](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/img/abp-own-mem.png) ##### uBO -![uBO](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/ublock-own-mem.png) +![uBO](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/img/ublock-own-mem.png) Both extensions had _EasyList_, _EasyPrivacy_, _Peter Lowe's Ad Server_ list, and malware protection (there are more filters in uBO for this last one). @@ -62,28 +62,28 @@ The results depend heavily on the processor: I benchmarked on an i5-3xxxK CPU @ Extensions have their memory footprint, but they also cause an increased memory footprint in web pages. Below you can see the added memory footprint in a simple web page like [Hacker News](https://news.ycombinator.com/). The first screenshot is when there is no extension used. Therefore, consider it as the reference memory footprint for this web page. Other screenshots show the increased memory footprint caused by each one. The browser was idle after loading the page to allow the garbage collector to kick in. **No extension:**
-![No extension](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/hn-alone.png) +![No extension](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/img/hn-alone.png) **ABP:**
-![ABP](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/hn-abp.png) +![ABP](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/img/hn-abp.png) **uBO:**
-![uBO](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/hn-ublock.png) +![uBO](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/img/hn-ublock.png) Now keep in mind this is the added footprint for a simple web page that has no embedded frames. You can multiply the added footprint on the main page by the number of frames embedded, so pages with frames can consume a _lot_ more memory than they would have otherwise. For instance, a simple web page with a couple of `iframe` in it, [The Acid3 Test](http://acid3.acidtests.org/): -![uBO](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/acid3test-mem.png)
+![uBO](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/img/acid3test-mem.png)
Added memory footprint: Left = no extension. Middle = ABP. Right = uBO. A good stress test that demonstrates this is the [infamous vim test](https://github.com/gorhill/httpswitchboard/wiki/Adblock-Plus-memory-consumption). ##### uBO vs. Adblock: memory usage differential during reference benchmark -![uBO vs. Adblock: memory usage differential during reference benchmark](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/media/ublock-vs-abp-cpu-2.png) +![uBO vs. Adblock: memory usage differential during reference benchmark](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/media/ublock-vs-abp-cpu-2.png) The above picture shows how much more memory ABP consumes over uBO. It represents the **extra memory** ABP consumes relative to uBO, so, essentially, uBO is the horizontal axis. If memory consumption of ABP and uBO were the same, there would be no graph. The [reference benchmark](/gorhill/uBlock/wiki/Reference-benchmark), consisting of visiting 60 front pages of high-traffic websites, was used. -The vertical axis represents MB. The horizontal axis is time in seconds. Data extraction occurred from [this video](https://www.youtube.com/watch?v=DKM78oV_ftg). (Consider the video to be the raw data. [Here is the spreadsheet](https://github.com/gorhill/uBlock/blob/master/doc/benchmarks/ublock-vs-abp-timeline.ods) so people in doubt can double-check). +The vertical axis represents MB. The horizontal axis is time in seconds. Data extraction occurred from [this video](https://www.youtube.com/watch?v=DKM78oV_ftg). (Consider the video to be the raw data. [Here is the spreadsheet](https://github.com/gorhill/uBlock/blob/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/benchmarks/ublock-vs-abp-timeline.ods) so people in doubt can double-check). The blue area represents how much more memory ABP consumes than uBO. The orange area depicts how much more ABP causes the web pages to consume more memory. ABP systematically causes web pages to consume more memory, and often quite a lot, north of 100 MB for some sites. This kind of added short-term memory overhead is not cheap, as it also means the CPU is working harder. @@ -93,7 +93,7 @@ Here is the benchmark comparing CPU usage in the background page when loading [s **Top:** ABP 1.8.3. **Bottom:** uBO 0.5.1.0. -![CPU benchmark](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/bgpage-cpu-si.comx10.png) +![CPU benchmark](https://raw.githubusercontent.com/gorhill/uBlock/6c046ed95cd02d023453c66f766159f6410ae7f7/doc/img/bgpage-cpu-si.comx10.png) Note: I measured CPU usage for content scripts, but any information was drowned in a sea of noise because the web page used for the benchmark is quite bloated. But the fact that ABP inserts 14,000+ CSS rules caused the CPU to use much more than uBO (2-3 to 1 ratio) when comparing content script CPU usage (again, above is background page CPU usage).