actions / setup-go

Set up your GitHub Actions workflow with a specific version of Go
MIT License
1.39k stars 514 forks source link

Cache on windows runner takes a long time to load #495

Open nikpivkin opened 1 month ago

nikpivkin commented 1 month ago

Description: We run tests on runners with different OS using matrix. On ubuntu and macos the cache loads in an acceptable time (about 30 seconds), but on цindows the cache loads for almost 12 minutes, which is very long. I didn't notice any windows related restrictions in the Readme.

Action version: actions/setup-go@v5

Platform:

Runner type:

Tools version: '1.22'

Repro steps:
Action: https://github.com/aquasecurity/trivy-aws/actions/runs/10383103541/job/28747388089?pr=210

Expected behavior: The cache loads quickly.

Actual behavior: The cache takes a long time to load.

priyagupta108 commented 1 month ago

Hello @nikpivkin ! Thank you for reporting this! We will investigate the issue and get back to you as soon as we have updates.

gowridurgad commented 2 weeks ago

Hi @nikpivkin, Here are few reasons why windows takes more time than ubuntu and macos:

System Architecture: Windows has a different system architecture compared to Unix-based systems like Ubuntu and macOS, often resulting in higher overhead for tasks involving disk I/O operations. File System Differences: The NTFS file system used by Windows is generally slower for certain types of operations compared to ext4 (used by Ubuntu) and APFS (used by macOS). Disk I/O Handling: Windows tends to have more background processes and services that can interfere with disk I/O operations, leading to longer cache loading times.

After analysing the issue, we concur that the current duration for both installation and cache reloading isn't ideal. The cache reloading process should indeed be optimized for enhanced speed. We appreciate your feedback and will contemplate this as a potential feature request for future improvements rather than a bug.