[Privoxy-users] Privoxy on a Raspberry Pi

Fabian Keil fk at fabiankeil.de
Thu Mar 16 12:14:20 UTC 2017


Lee <ler762 at gmail.com> wrote:

> This looks strange:
> 2017-03-15 21:59:51.262 b6ceb460 Connect: Done reading from server.
> Content length: 23531 as expected. Bytes most recently read: 4319.
> 2017-03-15 21:59:52.517 b6ceb460 Header: Adjusted Content-Length to
> 168029 2017-03-15 21:59:52.517 b6ceb460 Header: Crunching:
> Content-Encoding: gzip
> 
> privoxy received 23KB of gziped data and unzips it to 168KB -- which
> takes about 1.25 seconds!??

Probably Privoxy also executed a couple of filters which
weren't logged as "debug 64" has not been enabled.

On my laptop (with "debug 64" enabled) I get:

12:44:57.983 000 Connect: Done reading from server. Content length: 167641 as expected. Bytes most recently read: 3128.
12:44:57.984 000 Re-Filter: filtering www.clubic.com/ (size 167641 with 'css-add-blocker' produced 1 hits (new size 167738) (+97)
12:44:58.010 000 Re-Filter: filtering www.clubic.com/ (size 167738 with 'html-annoyances' produced 0 hits (new size 167738) (+0)
12:44:58.081 000 Re-Filter: filtering www.clubic.com/ (size 167738 with 'content-cookies' produced 1 hits (new size 167735) (-3)
12:44:58.083 000 Re-Filter: filtering www.clubic.com/ (size 167735 with 'refresh-tags' produced 0 hits (new size 167735) (+0)
12:44:58.096 000 Re-Filter: filtering www.clubic.com/ (size 167735 with 'img-reorder' produced 58 hits (new size 167735) (+0)
12:44:58.421 000 Re-Filter: filtering www.clubic.com/ (size 167735 with 'banners-by-size' produced 0 hits (new size 167735) (+0)
12:44:58.464 000 Re-Filter: filtering www.clubic.com/ (size 167735 with 'banners-by-link' produced 0 hits (new size 167735) (+0)
12:44:58.466 000 Re-Filter: filtering www.clubic.com/ (size 167735 with 'webbugs' produced 1 hits (new size 167610) (-125)
12:44:58.470 000 Re-Filter: filtering www.clubic.com/ (size 167610 with 'jumping-windows' produced 0 hits (new size 167610) (+0)
12:44:58.477 000 Re-Filter: filtering www.clubic.com/ (size 167610 with 'frameset-borders' produced 0 hits (new size 167610) (+0)
12:44:58.479 000 Re-Filter: filtering www.clubic.com/ (size 167610 with 'quicktime-kioskmode' produced 0 hits (new size 167610) (+0)
12:44:58.480 000 Re-Filter: filtering www.clubic.com/ (size 167610 with 'fix-twitter-links' produced 0 hits (new size 167610) (+0)
12:44:58.483 000 Re-Filter: filtering www.clubic.com/ (size 167610 with 'embedded-youtube-links' produced 0 hits (new size 167610) (+0)
12:44:58.484 000 Header: Adjusted Content-Length to 167610
127.0.0.1 - - [16/Mar/2017:12:44:58 +0100] "GET http://www.clubic.com/ HTTP/1.1" 200 167610

Executing the img-reorder filter takes a bit more than 300ms on my
laptop (Intel Core i5-2520 running at ~800Mhz) which is probably a
bit faster than a Rasperry Pi.

The filter has four pcrs commands but only two of them use the U(ngready)
flag and my first impression is that this is an oversight and not because
the commands have to be greedy to work as expected.

Setting the flag consistently should reduce the execution time a bit and
there are probably other optimisations that could be done.

In this case the most obvious optimisation would be to disable the filter
for this page as the banners-by-size and banners-by-link filters don't get
any hits anyway.

Obviously a more generic solution would be more useful, though.

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20170316/9c6dd08c/attachment.bin>


More information about the Privoxy-users mailing list