Document virus scanning performance impact and remedy

This commit is contained in:
Joe Mooring
2024-05-16 07:20:53 -07:00
committed by GitHub
parent dd5c3af041
commit d57b8a8cfb
+15 -1
View File
@@ -1,6 +1,6 @@
---
title: Performance
description: Use template metrics and timers to identify opportunities to improve performance.
description: Tools and suggestions for evaluating and improving performance.
categories: [troubleshooting]
keywords: []
menu:
@@ -12,6 +12,20 @@ toc: true
aliases: [/troubleshooting/build-performance/]
---
## Virus scanning
Virus scanners are an essential component of system protection, but the performance impact can be severe for applications like Hugo that frequently read and write to disk. For example, with Microsoft Defender Antivirus, build times for some sites may increase by 400% or more.
Before building a site, your virus scanner has already evaluated the files in your project directory. Scanning them again while building the site is superfluous. To improve performance, add Hugo's executable to your virus scanner's process exclusion list.
For example, with Microsoft Defender Antivirus:
**Start** > **Settings** > **Privacy & security** > **Windows Security** > **Open Windows Security** > **Virus & threat protection** > **Manage settings** > **Add or remove exclusions** > **Add an exclusion** > **Process**
Then type `hugo.exe` add press the **Add** button.
Other virus scanners have similar exclusion mechanisms. See documentation.
## Template metrics
Hugo is fast, but inefficient templates impede performance. Enable template metrics to determine which templates take the most time, and to identify caching opportunities: