Skip to content

Commit

Permalink
Document virus scanning performance impact and remedy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed May 16, 2024
1 parent dd5c3af commit d57b8a8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion content/en/troubleshooting/performance.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit d57b8a8

Please sign in to comment.