From 7d08f54f7dd4e016c0e17cbeec9fe23f79b33adb Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Mon, 10 Mar 2025 11:36:56 -0700 Subject: [PATCH 1/2] chore: decrease chunk size to make upload more responsive --- mapillary_tools/constants.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mapillary_tools/constants.py b/mapillary_tools/constants.py index a1a7f4292..6986ec3dc 100644 --- a/mapillary_tools/constants.py +++ b/mapillary_tools/constants.py @@ -26,7 +26,10 @@ _ENV_PREFIX + "SAMPLED_VIDEO_FRAMES_FILENAME", "mapillary_sampled_video_frames" ) USER_DATA_DIR = appdirs.user_data_dir(appname="mapillary_tools", appauthor="Mapillary") -UPLOAD_CHUNK_SIZE_MB = float(os.getenv(_ENV_PREFIX + "UPLOAD_CHUNK_SIZE_MB", 16)) +# The chunk size in MB (see chunked transfer encoding https://en.wikipedia.org/wiki/Chunked_transfer_encoding) +# for uploading data to MLY upload service. +# Changing this size does not change the number of requests nor affect upload performance +UPLOAD_CHUNK_SIZE_MB = float(os.getenv(_ENV_PREFIX + "UPLOAD_CHUNK_SIZE_MB", 1)) # DoP value, the lower the better # See https://github.com/gopro/gpmf-parser#hero5-black-with-gps-enabled-adds From f01efc8bfda33838383b06fb1504f97f02a023cf Mon Sep 17 00:00:00 2001 From: Tao Peng Date: Mon, 10 Mar 2025 11:48:26 -0700 Subject: [PATCH 2/2] update comment --- mapillary_tools/constants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mapillary_tools/constants.py b/mapillary_tools/constants.py index 6986ec3dc..64be1202a 100644 --- a/mapillary_tools/constants.py +++ b/mapillary_tools/constants.py @@ -28,7 +28,8 @@ USER_DATA_DIR = appdirs.user_data_dir(appname="mapillary_tools", appauthor="Mapillary") # The chunk size in MB (see chunked transfer encoding https://en.wikipedia.org/wiki/Chunked_transfer_encoding) # for uploading data to MLY upload service. -# Changing this size does not change the number of requests nor affect upload performance +# Changing this size does not change the number of requests nor affect upload performance, +# but it affects the responsiveness of the upload progress bar UPLOAD_CHUNK_SIZE_MB = float(os.getenv(_ENV_PREFIX + "UPLOAD_CHUNK_SIZE_MB", 1)) # DoP value, the lower the better