Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extremely slow on windows #1150

Open
asottile opened this issue Jan 31, 2023 · 2 comments
Open

extremely slow on windows #1150

asottile opened this issue Jan 31, 2023 · 2 comments

Comments

@asottile
Copy link

this action adds significant overhead to getting set up, I don't really know why but I tried comparing it in an empty repo against time git clone ...

  • actions/checkout@v3 (an empty repo from github): 11+ seconds
  • time git clone --depth=1 (an empty repo from github) (on a windows-latest runner): .613s
  • actions/checkout@v3 pre-commit/pre-commit: 37+ seconds
  • time git clone --depth=1 https://github.com/pre-commit/pre-comit (on a windows-latest runner): .802s

I get that windows tends to be slower than the linux runners, but this feels unacceptably slow. even linux feels slower than it should be (actions/checkout@v3 in pre-commit takes 2 seconds there)

here's the yaml that I used to test this (will probably delete the empty repo above since I just wanted to see how long it takes):

on: push
jobs:
  main:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v3
    - run: |
        set -x
        time git clone https://github.com/asottile/test-plz-ignore --depth=1
        time git clone https://github.com/pre-commit/pre-commit --depth=1
      shell: bash
@asottile
Copy link
Author

I tried writing my own, and it's still pretty unexplainably slow -- but still 3x faster on windows and 2x faster on linux than actions/checkout -- https://github.com/asottile/workflows#githubactionsfast-checkout

@BrettDong
Copy link
Contributor

BrettDong commented Mar 26, 2023

I profiled the actions/checkout@v3 on Windows runners a bit with ETW. Looks like even loading the node.exe PE image from disk to memory could stall the workflow for a couple of seconds! On the graph, only during 11s - 23s are git and git-remote-https doing real useful work. The first ten seconds are all overhead on something.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants