mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-04 01:59:38 +02:00
As seen at: https://whotracks.me/blog/adblockers_performance_study.html The requests.json.gz file can be downloaded from: https://cdn.cliqz.com/adblocking/requests_top500.json.gz Copy the file into ./tmp/requests.json.gz If the file is present when you build uBO using `make-[target].sh` from the shell, the resulting package will contain `./assets/requests.json`, which will be looked-up by the method below to launch a benchmark session. From uBO's dev console, launch the benchmark: µBlock.staticNetFilteringEngine.benchmark(); The usual browser dev tools can be used to obtain useful profiling data, i.e. start the profiler, call the benchmark method from the console, then stop the profiler when it completes. Keep in mind that the measurements at the blog post above where obtained with ONLY EasyList. The CPU reportedly used was: https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i7-6600U+%40+2.60GHz&id=2608 Rename ./tmp/requests.json.gz to something else if you no longer want ./assets/requests.json in the build.
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# This script assumes a linux environment
|
|
|
|
DES=$1/assets
|
|
|
|
printf "*** Packaging assets in $DES... "
|
|
|
|
if [ -n "${TRAVIS_TAG}" ]; then
|
|
pushd .. > /dev/null
|
|
git clone --depth 1 https://github.com/uBlockOrigin/uAssets.git
|
|
popd > /dev/null
|
|
fi
|
|
|
|
rm -rf $DES
|
|
mkdir $DES
|
|
cp ./assets/assets.json $DES/
|
|
|
|
if [ -f ./tmp/requests.json.gz ]; then
|
|
gunzip -c ./tmp/requests.json.gz > $DES/requests.json
|
|
fi
|
|
|
|
mkdir $DES/thirdparties
|
|
cp -R ../uAssets/thirdparties/easylist-downloads.adblockplus.org $DES/thirdparties/
|
|
cp -R ../uAssets/thirdparties/mirror1.malwaredomains.com $DES/thirdparties/
|
|
cp -R ../uAssets/thirdparties/pgl.yoyo.org $DES/thirdparties/
|
|
cp -R ../uAssets/thirdparties/publicsuffix.org $DES/thirdparties/
|
|
cp -R ../uAssets/thirdparties/www.malwaredomainlist.com $DES/thirdparties/
|
|
|
|
mkdir $DES/ublock
|
|
cp -R ../uAssets/filters/* $DES/ublock/
|
|
# Optional filter lists: do not include in package
|
|
rm $DES/ublock/annoyances.txt
|
|
|
|
echo "done."
|