1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-09 12:22:33 +01:00
Commit Graph

11 Commits

Author SHA1 Message Date
Raymond Hill
38aca48ee8
Remove obsolete entry 2019-12-01 09:00:00 -05:00
Raymond Hill
eec53c0154
Work toward modernizing code base: promisification
Swathes of code have been converted to use
Promises/async/await. More left to do.

Related commits:
- 915687fddb
- 55cc0c6997
- e27328f931
2019-09-16 09:45:17 -04:00
Raymond Hill
5b47a06cbe
Allow use of async/await 2019-05-21 08:31:43 -04:00
Raymond Hill
ed7e34fb07
Refactor selfie generation into a more flexible persistence mechanism
The motivation is to address the higher peak memory usage at launch
time with 3rd-gen HNTrie when a selfie was present.

The selfie generation prior to this change was to collect all
filtering data into a single data structure, and then to serialize
that whole structure at once into storage (using JSON.stringify).

However, HNTrie serialization requires that a large UintArray32 be
converted into a plain JS array, which itslef would be indirectly
converted into a JSON string. This was the main reason why peak
memory usage would be higher at launch from selfie, since the JSON
string would need to be wholly unserialized into JS objects, which
themselves would need to be converted into more specialized data
structures (like that Uint32Array one).

The solution to lower peak memory usage at launch is to refactor
selfie generation to allow a more piecemeal approach: each filtering
component is given the ability to serialize itself rather than to be
forced to be embedded in the master selfie. With this approach, the
HNTrie buffer can now serialize to its own storage by converting the
buffer data directly into a string which can be directly sent to
storage. This avoiding expensive intermediate steps such as
converting into a JS array and then to a JSON string.

As part of the refactoring, there was also opportunistic code
upgrade to ES6 and Promise (eventually all of uBO's code will be
proper ES6).

Additionally, the polyfill to bring getBytesInUse() to Firefox has
been revisited to replace the rather expensive previous
implementation with an implementation with virtually no overhead.
2019-02-14 13:33:55 -05:00
Raymond Hill
00236cf54f
Use esversion instead of deprecated esnext 2019-02-08 09:45:25 -05:00
gorhill
f09db15acb
adjust jshint behavior 2017-12-05 08:38:50 -05:00
gorhill
beb7933016
fix #2925 2017-08-29 18:32:00 -04:00
gorhill
541b850b54 bring cfg file up to date with latest jshint version 2016-06-26 17:19:30 -04:00
gorhill
a944873b83 code review: convert static filtering's tokenizer to a global utility 2015-12-29 11:34:41 -05:00
gorhill
9b4b998364 #608: this fixes a bunch of strictness-related warnings 2015-08-18 11:44:24 -04:00
Deathamns
6f2e449e61 Preferences button for Safari
Brings back the possibility to click a checkbox which opens the extension
settings from Safari's Preferences/Extensions.
2014-11-09 17:41:05 +01:00