Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear sir, 
iam building a windows service to get the log from attendance machine , but it loses 
some transaction !!!!! i do not know how , could the antivirus affect my windows service performance ....can it block my service even for milliseconds...

What I have tried:

i cannot find the lost records from log file
Updated 31-Oct-20 16:32pm
Member 13639193 20-Oct-20 0:37am    
iam working with VS2015 on windows 10 64 bit

Yes, antivirus can affect your performance as it hooks into the file IO operations and is able to delay them. But this is just one of many things that can cause delays (the CPU might be doing something else, the disk might be busy, the network stack sending/receiving other packages, ...). Routers and switches on the network can also delay your communication if you are communicating over the network.

So delays like this is an inherit property of a non-realtime operating system, and for this reason there are already mechanisms in the operating system to deal with this for you (queues). It should only be a problem if your service can't process data as fast as it is being generated.... unless you did something strange in your algorithm like making it required to run every millisecond (as you most certainly can't guarantee that).

If you are reading log files as they are being generated, this might not work reliable depending on the logging framework. The logging framework writing the log file might not deal well with your service having the log file open for reading. You do not provide enough details to tell us if this is a likely problem (what is "the log")?
Share this answer
i do not know how , could the antivirus affect my windows service performance ....can it block my service even for milliseconds

No, antivirus would not block for some and leave some. If it blocks, it will block it.

You need to look at your code and see where is the gap. Use logs to trace them out if debugging is not an option to figure it out or it is too random.
Share this answer
Member 13639193 20-Oct-20 2:52am
please check my main question here
Can antivirus affect my windows service performance

Yes, and other thing too, but it shouldn't matter.
The communication with some device should not depend on service being available at any rate.
A safe communication with a device should use a communication protocol that ensure that you don't loose data even with unreliable communication.

You need to give detail on how you communicate with device.
Share this answer
Patrice T 27-Oct-20 9:31am    
Use Improve question to update your question.
So that everyone can pay attention to this information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900