the problem was the microsoft antivirus that checks compressed .exe files
Compressed? Why? How? Upx?
There is no point to compress the lazarus.exe. Really not... Even Memory sticks are not that small.
Also the rest of the installation, takes far more space than the exe.
You can (after a rebuild) do:
C:\lazarus\fpc\3.2.2\bin\x86_64-win64\strip.exe lazarus.exe
And if, you somehow really need to look at each KB, then enable Windows build in compression in the (advanced) properties of the containing folder/drive. (Assuming it is supported by the filesystem with which you formatted the drive)
Or do you mean to say the AV uses more time, if the file is in a folder with compression enabled? If that is the case, then any other access to files in the folder is likely equally affected....