This is a known issue, and Microsoft will not address it. The antivirus is the root cause of the problem and since ASP is no longer supported, the only way to fix it is by disabling the AV entirely. Not even adding files to the AV exception list solves the issue.
I opened multiple tickets. Microsoft ignored and deleted them all.
This was my last interaction: https://answers.microsoft.com/en-us/windows/forum/all/classic-asp-very-slow-when-windows-defender-is/5a43ccb0-8849-47a9-9704-784399f26e69