-
Notifications
You must be signed in to change notification settings - Fork 435
Myth: uBlock consumes over 80MB
Some have stated that uBlock is not as memory efficient as claimed.
When uBlock launches, it loads all selected filter lists, parses the content, eliminates duplicates, then instantiates the filters using efficient internal representation. This parsing of the filter lists requires a good amount of temporary memory.
If you look at the task manager right after uBlock has loaded and parsed the filter lists, you will still see uBlock's memory footprint as a result of loading all the filter lists. At this point all this temporary memory has been relinquished to the browser, but the browser hasn't yet collected the freed memory to make it available for reuse.
If the browser is idle enough, before one minute has elapsed, the browser should be able to garbage collect the temporary memory which was freed by uBlock after it finished loading and parsing the filter lists:
The top image shows the memory footprint of uBlock immediately after launch (Chrome 64-bit) (expect similar memory footprint each time the filter lists have to be reloaded). The image at the bottom shows the memory footprint of uBlock before one minute has elapsed while the browser is idle.
Note that uBlock's baseline memory footprint will not change much after this time period. It will likely settle a few MB above the memory footprint reached after garbage collection has occurred.
When reloading all filters (after changing selection of filter lists, for example), uBlock's baseline memory footprint edges higher each time. This issue is a reminder to investigate whether anything can be done for this. It's possible that this is caused by cumulative memory fragmentation and there might not be anything which can be done. Since users will typically select a set of lists and stick to them, this issue is not too important.