@@ -200,25 +200,32 @@ def decorator(function):
200200 @wraps (function )
201201 def s3_env_wrapper (* args , ** kwargs ):
202202 with rasterio .Env (
203- # Set to TRUE or EMPTY_DIR to avoid listing all files in the directory once a single file is opened (this is highly recommended).
204- GDAL_DISABLE_READDIR_ON_OPEN = True ,
205- # # Size of the default block cache, can be set in byte, MB, or as a percentage of available main, memory.
206- # GDAL_CACHEMAX=gdal_cachemax_bytes, # => doesn't seem to improve anything, in fact slows down things a bit
207203 # Global cache size for downloads in bytes, defaults to 16 MB.
208204 CPL_VSIL_CURL_CACHE_SIZE = mo_to_bytes (200 ),
205+ #
209206 # Enable / disable per-file caching by setting to TRUE or FALSE.
210207 VSI_CACHE = True ,
208+ #
211209 # Per-file cache size in bytes
212210 VSI_CACHE_SIZE = mo_to_bytes (5 ),
211+ #
213212 # When set to YES, this attempts to download multiple range requests in parallel, reusing the same TCP connection
214213 GDAL_HTTP_MULTIPLEX = True ,
214+ #
215215 # Gives the number of initial bytes GDAL should read when opening a file and inspecting its metadata.
216216 GDAL_INGESTED_BYTES_AT_OPEN = ko_to_bytes (32 ),
217217 GDAL_HTTP_VERSION = 2 ,
218+ #
218219 # Tells GDAL to merge consecutive range GET requests.
219220 GDAL_HTTP_MERGE_CONSECUTIVE_RANGES = "YES" ,
221+ #
222+ # -- useless by experience --
223+ # Size of the default block cache, can be set in byte, MB, or as a percentage of available main, memory.
224+ # GDAL_CACHEMAX=gdal_cachemax_bytes, # => doesn't seem to improve anything, in fact slows down things a bit
220225 # Number of threads GDAL can use for block reads and (de)compression, set to ALL_CPUS to use all available cores.
221- # GDAL_NUM_THREADS="ALL_CPUS", # => doesn't seem to improve anything, in fact slows down things
226+ # GDAL_NUM_THREADS="ALL_CPUS", # => doesn't seem to improve anything, in fact slows down things
227+ # Set to TRUE or EMPTY_DIR to avoid listing all files in the directory once a single file is opened (this is highly recommended).
228+ # GDAL_DISABLE_READDIR_ON_OPEN=True, # => seems to have drawbacks especially for s2
222229 ):
223230 return unistra .s3_env (
224231 function (* args , ** kwargs ), use_s3_env_var = CI_EOREADER_S3
0 commit comments