Re: [squid-users] Regex optimization

2016-06-17 Thread Yuri Voinov
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 By the way, I do not care that there is the relevance of porn sites. Rummage in this shit and check I somehow do not want to. I am satisfied that blocked most of which are my users trying to surf. 17.06.2016 3:11, Benjamin E. Nichols пишет: > > >

Re: [squid-users] Regex optimization

2016-06-17 Thread Yuri Voinov
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Shallalist seems most acceptable free blacklist. With fine grained categories. Of course, it require human power to maintain. If this one does not will to do, just sit back and wait for someone to do - as is usually done in open source software,

Re: [squid-users] Regex optimization

2016-06-16 Thread Amos Jeffries
On 27/04/2016 11:32 p.m., Alfredo Rezinovsky wrote: > I saw in debug log that when an ACL has many regexes each one is compared > sequentially. > > If I have > > www.facebook.com > facebook.com > www.google.com > google.com > > If will be faster to check just ONE optimized regex like > (www\.)?(

Re: [squid-users] Regex optimization

2016-06-16 Thread Amos Jeffries
On 17/06/2016 10:23 a.m., Alfredo Rezinovsky wrote: > A small quantity of big regexes performs well. The CPU load is the same as > if there's no regex at all. > > The thing I don't understand is why this specific regex matches every uri I > throw at it in squid, but not in linux grep, or regex101.

Re: [squid-users] Regex optimization

2016-06-16 Thread Alfredo Rezinovsky
A small quantity of big regexes performs well. The CPU load is the same as if there's no regex at all. The thing I don't understand is why this specific regex matches every uri I throw at it in squid, but not in linux grep, or regex101.com. The generation of the big regexes takes seconds and is d

Re: [squid-users] Regex optimization

2016-06-16 Thread Benjamin E. Nichols
On 6/16/2016 3:28 PM, Yuri Voinov wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I propose to nominate for the second place of the contest "The most inefficient use of computing resources - 2016." :-!:-D Because first place already occuped. :-D 30 millions pornsites in one squid's

Re: [squid-users] Regex optimization

2016-06-16 Thread Yuri Voinov
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I propose to nominate for the second place of the contest "The most inefficient use of computing resources - 2016." :-!:-D Because first place already occuped. :-D 30 millions pornsites in one squid's ACL and 7 minutes for squid -k refresh. 8-)

Re: [squid-users] Regex optimization

2016-06-16 Thread Antony Stone
On Thursday 16 June 2016 at 21:11:50, Alfredo Rezinovsky wrote: > Well.. I tried. > I need to ban 8613 URLs. Because a law. Have you considered https://www.urlfilterdb.com/products/ufdbguard.html ? > If I put one per line in a file and set the filename for an url_regex acl > it works. But when t

Re: [squid-users] Regex optimization

2016-04-27 Thread Yuri Voinov
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Furthermore. The more specifically a regular expression, so it usually faster. 27.04.16 20:01, Amos Jeffries пишет: > On 27/04/2016 11:32 p.m., Alfredo Rezinovsky wrote: >> I saw in debug log that when an ACL has many regexes each one is compared

Re: [squid-users] Regex optimization

2016-04-27 Thread Yuri Voinov
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 27.04.16 20:01, Amos Jeffries пишет: > On 27/04/2016 11:32 p.m., Alfredo Rezinovsky wrote: >> I saw in debug log that when an ACL has many regexes each one is compared >> sequentially. >> >> If I have >> >> www.facebook.com >> facebook.com >> www

Re: [squid-users] Regex optimization

2016-04-27 Thread Amos Jeffries
On 27/04/2016 11:32 p.m., Alfredo Rezinovsky wrote: > I saw in debug log that when an ACL has many regexes each one is compared > sequentially. > > If I have > > www.facebook.com > facebook.com > www.google.com > google.com > > If will be faster to check just ONE optimized regex like > (www\.)?(

Re: [squid-users] Regex optimization

2016-04-27 Thread Yuri Voinov
Wrong. When you test regex, you can see this: https://i1.someimage.com/Ae6P3is.png this: https://i1.someimage.com/70Y4kl9.png and this: https://i1.someimage.com/rNjCjVX.png As you can see, green bar in upper right corner shows you steps count when parse and _execute_ regex. This is performa

Re: [squid-users] Regex optimization

2016-04-27 Thread Alfredo Rezinovsky
Not my question. I'm asking about performance 2016-04-27 9:09 GMT-03:00 Yuri Voinov : > https://regex101.com is your best friend. > > 27.04.16 17:32, Alfredo Rezinovsky пишет: > > I saw in debug log that when an ACL has many regexes each one is compared > sequentially. > > If I have > > www.faceb

Re: [squid-users] Regex optimization

2016-04-27 Thread Yuri Voinov
https://regex101.com is your best friend. 27.04.16 17:32, Alfredo Rezinovsky пишет: I saw in debug log that when an ACL has many regexes each one is compared sequentially. If I have www.facebook.com facebook.com www.google.com

[squid-users] Regex optimization

2016-04-27 Thread Alfredo Rezinovsky
I saw in debug log that when an ACL has many regexes each one is compared sequentially. If I have www.facebook.com facebook.com www.google.com google.com If will be faster to check just ONE optimized regex like (www\.)?(facebook|google).com than the previous three? I'm really talking about opti