From 81f24c3456300259fb8eff061bdbdc924434804d Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 11 Oct 2021 09:21:10 +0200 Subject: [PATCH] Decrease chunk size, log time taken --- client/src/utils/uploadbox.js | 7 ++++++- lib/galaxy/webapps/galaxy/config_schema.yml | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/utils/uploadbox.js b/client/src/utils/uploadbox.js index 22496b39c51..f4464b947ae 100644 --- a/client/src/utils/uploadbox.js +++ b/client/src/utils/uploadbox.js @@ -95,6 +95,7 @@ import * as tus from "tus-js-client"; cnf.error(cnf.error_file); return; } + const startTime = performance.now(); const file = file_data.file; const tusEndpoint = `${getAppRoot()}api/upload/resumable_upload`; const chunkSize = cnf.session.chunk_upload_size; @@ -114,7 +115,11 @@ import * as tus from "tus-js-client"; cnf.progress(percentage); }, onSuccess: function () { - console.log("Download %s from %s", upload.file.name, upload.url); + console.log( + `Download ${upload.file.name} from ${upload.url} took ${ + (performance.now() - startTime) / 1000 + } seconds` + ); cnf.success({}); }, }); diff --git a/lib/galaxy/webapps/galaxy/config_schema.yml b/lib/galaxy/webapps/galaxy/config_schema.yml index fb958b5ce18..e6937a35c73 100644 --- a/lib/galaxy/webapps/galaxy/config_schema.yml +++ b/lib/galaxy/webapps/galaxy/config_schema.yml @@ -1704,12 +1704,12 @@ mapping: chunk_upload_size: type: int - default: 104857600 + default: 10485760 required: false desc: | Galaxy can upload user files in chunks without using nginx. Enable the chunk uploader by specifying a chunk size larger than 0. The chunk size is specified - in bytes (default: 100MB). + in bytes (default: 10MB). dynamic_proxy_manage: type: bool