Any strategy for speeding up cogeo_mosaic.mosaic.MosaicJSON.from_urls
requests?
#223
prncevince
started this conversation in
General
Replies: 1 comment 1 reply
-
I tried setting I'm creating mosaics of up to ~9,000 COG tiles, so I thought that setting I'm running python |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a
max_threads
argument inMosaicJSON.from_urls
. It's set to a default value of20
.cogeo-mosaic/cogeo_mosaic/mosaic.py
Lines 240 to 248 in 4f88749
Ultimately, this gets passed to
get_footprints
cogeo-mosaic/cogeo_mosaic/utils.py
Lines 79 to 84 in 4f88749
... and then to a concurrent.futures.ThreadPoolExecutor call.
cogeo-mosaic/cogeo_mosaic/utils.py
Line 105 in 4f88749
I am no
concurrent.futures
python GIL expert. On my MBP M1 Pro with 32GB of RAM,import os;os.cpu_count()
reports10
, which tells me that I have 10 CPU cores.I still find that
MosaicJSON.from_urls
runs slow with the defaultmax_threads=20
. Are there any strategies for speeding things up? Thank you!Beta Was this translation helpful? Give feedback.
All reactions