I am developing a program in Visual C (Microsoft Visual Studio) and noticed one unpleasant feature related to Avast antivirus. After compiling and running the program, it has time to execute (it is still small) before Avast antivirus starts checking it. And after the program has been checked, it executes again. Naturally, if the same program (without changing the code and compiling) will be run again, then it will no longer be checked and executed once.
Thus, it can be concluded that new and fast-running programs will be executed at least once before they are checked by the Avast antivirus and one more time if the program has passed the Avast antivirus check. It seems to me that this behavior is wrong.
PS: My OS is Windows 7
No idea, to my old windows games, if it is true that when executing, it is scanned (by the behavioral shield, or the file system) and by not detecting anything it is executed again this time if it really is. ;D
There are 2 options that you see in the scanner image 1. Obviously, if you deactivate, for example, “analyze when opening”, for example, neither those that you create nor any executable will be analyzed so that maybe this is not a good idea. 
In scanner image 2 you will see the option of exclusions. It is in options → protection → virus analysis → and the bottom of the options in text says “see the exceptions” by pressing will open that screen.
Just put the applications that you run in a folder x, then go to that screen and put the folder x exception, so it does not analyze anything that you run in that folder x. 
gatocan2066,
thank you, your workaround is helped me a lot