Skip to content

Commit

Permalink
Parallelize calls to copy from/to GCS
Browse files Browse the repository at this point in the history
The -m flag copies from multiple threads and makes a huge
performance difference for large trees.
  • Loading branch information
coryrc authored and tekton-robot committed Sep 11, 2020
1 parent 1d6b4b1 commit 28667d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion task/gcs-download/0.1/gcs-download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
if [[ "$(params.typeDir)" == "true" ]]; then
mkdir -p "$DESTINATION"
gsutil rsync -d -r "$(params.location)" "$DESTINATION"
gsutil -m rsync -d -r "$(params.location)" "$DESTINATION"
else
gsutil cp $(params.location) "$DESTINATION"
fi
2 changes: 1 addition & 1 deletion task/gcs-upload/0.1/gcs-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
fi
if [[ -d "$SOURCE" ]]; then
gsutil rsync -d -r "$SOURCE" "$(params.location)"
gsutil -m rsync -d -r "$SOURCE" "$(params.location)"
else
gsutil cp "$SOURCE" "$(params.location)"
fi

0 comments on commit 28667d2

Please sign in to comment.