I created a test site that resizes and converts over 100 very large images. Before each test I (a) close my IDE (VS Code) to eliminate delays related to the file watcher, and (b) delete the resources directory.
Linux: 20 s
Windows: 21 s (project in C:\temp, Hugo installed via prebuilt binary for Windows)
Windows via WSL: 19 s (project in /mnt/c/temp, Hugo installed via prebuilt binary for Linux)
The differences are noise.
I just noticed you are accessing the .GitInfo properties. Do you get the same results when that is disabled?
Are you running a third-party virus scanner on Windows (BitDefender, Avast, etc.)? If yes, disable and test again.
Do you terminate WSL before testing the Windows build? I know that WSL can eat some memory, but it shouldn’t be significant on a system with 16 GB RAM.
I try to shut down the WSL (wsl --shutdown), and close any running programs (IDEs and others) and re-run the build on Windows, but the result is same that slower 2x than WSL.
Have no clue about this, since there is no platform specified codes in the project, will check which parts/functions are slower than Linux, and post it here if found any.