1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00
uBlock/src
Raymond Hill 725e6931f5
Refactoring work in static network filtering engine
The original motivation is to further speed up launch time
for either non-selfie-based and selfie-based initialization
of the static network filtering engine (SNFE).

As a result of the refactoring:

Filters are no longer instance-based, they are sequence-of-
integer-based. This eliminates the need to create instances
of filters at launch, and consequently eliminates all the
calls to class constructors, the resulting churning of memory,
and so forth.

All the properties defining filter instances are now as much
as possible 32-bit integer-based, and these are allocated in a
single module-scoped typed array -- this eliminates the need
to allocate memory for every filter being instantiated.

Not all filter properties can be represented as a 32-bit
integer, and in this case a filter class can allocate slots
into another module-scoped array of references.

As a result, this eliminates a lot of memory allocations when
the SNFE is populated with filters, and this makes the saving
and loading of selfie more straightforward, as the operation
is reduced to saving/loading two arrays, one of 32-bit
integers, and the other, much smaller, an array JSON-able
values.

All filter classes now only contain static methods, and all
of these methods are called with an index to the specific
filter data in the module-scoped array of 32-bit integers.

The filter sequences (used to avoid the use of JS arrays) are
also allocated in the single module-scoped array of 32-bit
integers -- they used to be stored in their own dedicated
array.

Additionally, some filters are now loaded more in a deferred
way, so as reduce uBO's time-to-readiness -- the outcome of
this still needs to be evaluated, time-to-readiness is
especially a concern in Firefox for Android or less powerful
computers.
2021-12-04 11:16:44 -05:00
..
_locales Import translation work from https://crowdin.com/project/ublock 2021-11-30 08:04:45 -05:00
css More fine tuning of filter issue report feature 2021-11-28 07:47:16 -05:00
img Add ability to report filter issue from popup panel 2021-11-11 12:49:55 -05:00
js Refactoring work in static network filtering engine 2021-12-04 11:16:44 -05:00
lib Further fine-tuning new Support pane 2021-10-14 08:54:38 -04:00
web_accessible_resources Have getAll() returns at least one neutered Tracker object 2021-12-04 11:07:19 -05:00
1p-filters.html Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
3p-filters.html Remove more cases of svg/use 2020-08-06 09:05:10 -04:00
about.html Further fine-tune new Support pane 2021-10-15 14:50:34 -04:00
advanced-settings.html Complete removal of font-based Fontawesome icons 2020-12-06 11:24:04 -05:00
asset-viewer.html Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
background.html Further work on JS modules 2021-10-07 14:41:29 -04:00
cloud-ui.html Fix layout issue with cloud storage widget 2020-08-21 08:57:47 -04:00
dashboard.html Add "Support" pane to dashboard 2021-10-12 11:19:56 -04:00
document-blocked.html Fix missing magnifier in document-blocked page 2020-12-07 14:32:59 -05:00
dyna-rules.html Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
logger-ui.html Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
no-dashboard.html Add missing no-dashboard page 2021-01-06 12:09:53 -05:00
popup-fenix.html Add ability to report filter issue from popup panel 2021-11-11 12:49:55 -05:00
popup.html Convert punycode.js into an ES module (#3845) 2021-08-22 12:03:59 -04:00
settings.html Keep ability to prevent local IP address leaks for mobile version 2021-09-15 08:28:10 -04:00
shortcuts.html Lint HTML files using tidy 2020-04-25 11:31:42 -04:00
support.html More fine tuning of filter issue report feature 2021-11-28 07:47:16 -05:00
whitelist.html Convert punycode.js into an ES module (#3845) 2021-08-22 12:03:59 -04:00