uBlock/src/background.html

48 lines
1.8 KiB
HTML
Raw Normal View History

2014-06-23 16:42:43 -06:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
2015-05-26 06:43:46 -06:00
<title>uBlock Origin</title>
2014-06-23 16:42:43 -06:00
</head>
<body>
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 11:33:55 -07:00
<script src="js/console.js"></script>
<script src="lib/lz4/lz4-block-codec-any.js"></script>
<script src="lib/punycode.js"></script>
<script src="lib/publicsuffixlist/publicsuffixlist.js"></script>
<script src="js/vapi.js"></script>
<script src="js/vapi-common.js"></script>
<script src="js/vapi-background.js"></script>
2017-09-02 04:11:33 -06:00
<script src="js/vapi-webrequest.js"></script><!-- Forks can pick the webext, chromium, or their own implementation -->
2014-06-23 16:42:43 -06:00
<script src="js/background.js"></script>
<script src="js/traffic.js"></script>
2017-11-02 13:49:11 -06:00
<script src="js/hntrie.js"></script>
<script src="js/strie.js"></script>
2014-06-23 16:42:43 -06:00
<script src="js/utils.js"></script>
2015-01-08 08:37:19 -07:00
<script src="js/uritools.js"></script>
<script src="js/lz4.js"></script>
<script src="js/cachestorage.js"></script>
2014-06-23 16:42:43 -06:00
<script src="js/assets.js"></script>
<script src="js/filtering-context.js"></script>
<script src="js/redirect-engine.js"></script>
<script src="js/dynamic-net-filtering.js"></script>
<script src="js/static-net-filtering.js"></script>
2015-05-21 12:15:17 -06:00
<script src="js/url-net-filtering.js"></script>
<script src="js/static-ext-filtering.js"></script>
2014-09-14 14:20:40 -06:00
<script src="js/cosmetic-filtering.js"></script>
<script src="js/scriptlet-filtering.js"></script>
<script src="js/html-filtering.js"></script>
2015-03-27 11:00:55 -06:00
<script src="js/hnswitches.js"></script>
2014-06-23 16:42:43 -06:00
<script src="js/ublock.js"></script>
<script src="js/messaging.js"></script>
<script src="js/storage.js"></script>
<script src="js/logger.js"></script>
2014-06-23 16:42:43 -06:00
<script src="js/pagestore.js"></script>
<script src="js/tab.js"></script>
2018-01-02 21:06:16 -07:00
<script src="js/text-encode.js"></script>
2014-09-28 10:05:46 -06:00
<script src="js/contextmenu.js"></script>
<script src="js/reverselookup.js"></script>
2014-06-23 16:42:43 -06:00
<script src="js/start.js"></script>
2017-05-27 09:51:24 -06:00
<script src="js/commands.js"></script>
2014-06-23 16:42:43 -06:00
</body>
</html>