Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-8233

Improve LFS checkout times

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      When git checkout is invoked on a LFS repository it will call the LFS smudge filter once per LFS file being checkedout.

      Normally this is ok, it reads the file contents from .git/lfs/objects, however if the file isn't stored locally, it needs to fetch it from the remote.

      The process per file is

      1. Request the download URL over HTTP(S) from the remote.
      2. Download the file from the LFS store.

      However if the remote is SSH the process is far worse because theres a bonus step that the start

      1. Request a Auth token over SSH
      2. Using the auth token request the download URL over HTTP(S) from the remote.
      3. Download the file from the LFS store.

      Because of this each file can start taking multiple seconds to checkout.

      If Sourcetree could call git lfs fetch <branch_name> before checkout then all the files that will be required for this checkout could be downloaded in parallel with a single call to get download URLs for all the files at once.

      Workarounds

      If you are experiencing this issue there are a couple of things you can do to improve your speeds.

      If you are using a SSH remote switching to a HTTPS remote will improve your checkout times massively as you eliminate the extremely costly SSH step.

      If you are using HTTP(S) Remote you can open a terminal and run git lfs fetch <branch_name> before you checkout using Sourcetree and the checkout won't have to interact with the remote server at all.

              Unassigned Unassigned
              sgoodhew Scott Goodhew (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: