ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Performance regarding commandline scans of singel files
hoernchenmeister


Joined: 20 May 2010
Posts: 0
Reply with quote
Good morning all,
I am doing email scans with commandline calls using C#.
Everything works fine so far, I just stumbled into a question regarding performance when scanning single files repeadingly.
The call uses the following arguments for single files:
--database=C:\ProgramData\.clamwin\db" --recursive c:\somedirectory\someemail.eml
and this one for directories:
--database=C:\ProgramData\.clamwin\db" --recursive c:\somedirectory

The directory scan performs fine and scans about 80 files in 5 sec, while on the other hand the single file scan takes about 12 sec for a file.
I assume this has something to do with loading the virus definitions before scanning a file each time, while the directory scan loads the definitions once and uses them for all files withing the directory.

Does anybody has an advice or a suggestion on how to improve single file scan performance?
...or point me into a direction on how to handle this?

Any help is kindly appreciated,
best regards
Andy
View user's profileSend private message
GuitarBob


Joined: 09 Jul 2006
Posts: 9
Location: USA
Reply with quote
Yes, ClamWin must load the virus signature database before each scan. In addition, it uses the clamscan executable for scanning, instead of the more functional clamdscan. ClamWin really needs a re-write of the code for improvement in this area. Until then, if you are scanning all files, it might help (only a small bit) if you confine your scans to look at only the 50 or so file extensions most likely to harbor malware, and also scan only the most popular directories for malware--primarily system 32, users/documents and settings.

Regards,
View user's profileSend private message
Performance regarding commandline scans of singel files
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
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic