Some security programs can identify programming environments as malicious.
This is known as a false positive.
Avast has an EXCLUSIONS list to which you can add known good sources / programs / folders, etc.
You should re-install your antivirus and add the Arduino locations to its list.
Slow compiles or driver errors under Windows
Add the Arduino directories to your antivirus / anti malware / other security exclusions.
So that would be at least two of the following.
C:\Program Files (x86)\Arduino
C:\Users\yourname\AppData\Local\Arduino15 (depends on IDE install type/location)
C:\Users\yourname\AppData\Roaming\Arduino15 (depends on IDE install type/location)
If you have your sketches set up in a different location it’s also worth adding that directory to the exclusions also.
Additionally if you also use the online IDE “CREATE” the following directories.
C:\Users\yourname\AppData\Roaming\ArduinoCreateAgent
C:\Users\yourname\AppData.arduino-create
If you have installed to a different drive swap the drive letter as needed.
If you also have an unzipped IDE installed that path should also be added to exclusions
Bob.