|
Donations |
|
|
|
|
|
If you found this site helpful, please donate to help keep it online
Don't want to use PayPal? Try our physical address
|
|
|
Survey |
|
|
|
|
|
|
|
|
Translate |
|
|
|
|
|
|
|
|
|
|
View previous topic :: View next topic |
Author |
Message |
eli2k
Private
Joined: Mar 27, 2003
Posts: 45
Location: USA
|
Posted: Mon Mar 15, 2004 4:08 pm Post subject: Does Proxomitron Increase CPU resources? |
|
|
If there are a lot of filters in Proxomitron (eg JD5000 + a bunch of my own webfilters), will it increase CPU resources whenever a page is loaded, since Proxomitron has to look through it all and match the rules...? Otherwise I'm coding my filters inefficiently... |
|
Back to top |
|
|
Lepus
Trooper
Joined: Mar 02, 2004
Posts: 15
Location: USA
|
Posted: Mon Mar 15, 2004 4:39 pm Post subject: |
|
|
Well, there's no free lunch - more filters will use more CPU, but even more importantly, just one really inefficient filter can use more CPU than dozens of better ones. |
|
Back to top |
|
|
eli2k
Private
Joined: Mar 27, 2003
Posts: 45
Location: USA
|
Posted: Tue Mar 16, 2004 6:45 pm Post subject: |
|
|
Hmm, what's the most common source of inefficiency when creating a filter? I might have caused this inefficiency. :/
_________________
~ Eli |
|
Back to top |
|
|
Lepus
Trooper
Joined: Mar 02, 2004
Posts: 15
Location: USA
|
Posted: Tue Mar 16, 2004 7:45 pm Post subject: |
|
|
Well, I don't know that any exhaustive research has been done on the subject. I'd say in general the worst comes come copying bits and pieces from other filters without fully understanding what they do or why they're written that way. It's possible that a filter may work, yet be doing all kinds of unnecessary steps. It's also possible to pick up on someone else's bad habits.
It's good to remember for every spot a filter matches there's thousands of spots it won't, so always optimize for the negative case. In other words, the sooner you can eliminate a possible match the better. For example, a simple bounds match like "<a*</a>" may eliminate many possibilities before performing some more complex check within those tags. You seldom want the bounds to do too much detailed checking - save that for the main match.
Another tip - when possible, start a match with fixed text. It's quicker to check, and when it doesn't match the filter needs to look no further. For example "<*..." rather than "*<*..." or "<a*>&$TST(foo=*bar*)" over "$TST(foo=*bar*)&<a*>" |
|
Back to top |
|
|
eli2k
Private
Joined: Mar 27, 2003
Posts: 45
Location: USA
|
Posted: Thu Mar 18, 2004 8:00 pm Post subject: |
|
|
I should read up on the Bounds Match feature - I never really understood what it was for. Does Byte Limit help reduce CPU cycles in any way?
I usually do Pattern matches with a text*text match, so that might be okay.
_________________
~ Eli |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
|
Powered by phpBB 2.0.8a © 2001 phpBB Group
Version 2.0.6 of PHP-Nuke Port by Tom Nitzschner © 2002 www.toms-home.com
Version 2.2 by Paul Laudanski © 2003-2004 Computer Cops
|