Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [Clamav-users] Updated unofficial-sigs.sh script available

From: Kyle Lanclos <lanclos(at)ucolick.org>
Date: Tue Sep 25 2007 - 23:32:04 EDT


Dennis wrote:
> You can rip out a lot of code (well, some code) if you just use the Perl
> date method by default and forget the date +%s stuff entirely.

Your mileage may vary.

$ time perl -le print+time

real 0m0.002s

$ time date +%s

real 0m0.001s

(Those results were surprisingly consistent on my Linux box.)

My version of "keep it simple" in this situation is that if you have to invoke another language interpreter to provide a required feature, the base script itself should probably be written in a different language.

Do you need help?X

If the base script will remain a shell script, you're better off invoking smaller, less-expensive programs whenever possible. This cost savings diminishes very quickly if your script has to make a lot of external program calls, where with a more fully featured language you might have handled all those external functions in-line.

If it matters enough, of course, you try both, and profile the results to see which is more efficient under load.

I'm probably preaching to the choir on this, and for that I apologize. It's already been a long week.

--Kyle



Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://lurker.clamav.net/list/clamav-users.html Received on Tue Sep 25 23:32:54 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 28 2007 - 17:41:03 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library