You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_findRasters in the base class (GeoIndexedRaster) uses multiple finder threads to search for rasters containing a point. In the Landsat dataset code, an SR dictionary is currently used to store all valid band names ("B09", "B01", etc.). However, access to the dictionary must be guarded by a mutex, which limits the performance of multiple raster finder threads.
There are 15 bands for L8 and 18 for S2, so replacing the dictionary with an std::vector or array will have minimal impact on retrieval time for each band.
TODO: Replace the dictionary of valid bands in LandsatHlsRaster with an std::vector to allow concurrent access by multiple threads without locking, and remove the mutex.
The text was updated successfully, but these errors were encountered:
@elidwa, nominally, reading a dictionary does not need to be guarded by a mutex - only if the dictionary is changing while it is being read (e.g. entries are being added or deleted)
Fixed this in #433
I replaced SR Dictionary with std::unordered_map<std::string, bool> without changing of what goes into the dictionary/map. Mutex is no longer required. Only main thread created the dictionary and worker threads were reading from it but without mutex code was crashing.
_findRasters in the base class (GeoIndexedRaster) uses multiple finder threads to search for rasters containing a point. In the Landsat dataset code, an SR dictionary is currently used to store all valid band names ("B09", "B01", etc.). However, access to the dictionary must be guarded by a mutex, which limits the performance of multiple raster finder threads.
There are 15 bands for L8 and 18 for S2, so replacing the dictionary with an std::vector or array will have minimal impact on retrieval time for each band.
TODO: Replace the dictionary of valid bands in LandsatHlsRaster with an std::vector to allow concurrent access by multiple threads without locking, and remove the mutex.
The text was updated successfully, but these errors were encountered: