Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: first "project"

by zentara (Archbishop)
on Jun 02, 2004 at 12:40 UTC ( #359382=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: first "project"
in thread first "project"

"I don't work on it much, but it does work - although VERY slowly! If you can see any reason why it runs slow for me, let me know and I'll change it."

Ok I see you are running a perl module interface to clamav

use Mail::ClamAV qw/:all/;
I'm talking about running the clamscan program itself directly:
my $results = `clamscan $dir`;
or something using Tk::Fileevent like:
my $dir = "/var/spool/mail"; my $program = "/usr/local/bin/clamscan $dir"; open(SCAN, "$program 2>&1 |") or die "Can't open: $!"; $mw->fileevent(\*SCAN, 'readable', [\&fill_text_widget,$t]); MainLoop; sub fill_text_widget { my($widget) = @_; $_ = <SCAN>; $widget->insert('end', $_); $widget->yview('end'); }

Its almost always faster to run properly designed c programs when doing alot of file access and reading, so let clamscan do it.


I'm not really a human, but I play one on earth. flash japh


Comment on Re: Re: Re: first "project"
Select or Download Code
Re^4: first "project"
by phenom (Chaplain) on Jun 11, 2004 at 02:03 UTC
    Ok, I rewrote the clamscan version with your suggestion (see this). But it's still a little sluggish compared to the File::Scan version.

    I'd really like to switch to just doing the clamscan version, as it detects many more viruses.

    I'll try the Tk::Fileevent attempt soon. Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://359382]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-09-19 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls