-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I'm reading up on zarrita.js and comparing it to https://geotiffjs.github.io/.
One of the nice user-facing amenities of geotiff.js is its Pool abstraction:
Using decoder pools to improve parsing performance
Decoding compressed images can be a time consuming process. To minimize this geotiff.js provides the
Poolmechanism which uses WebWorkers to split the amount of work on multiple 'threads'.const pool = new GeoTIFF.Pool(); const data = await image.readRasters({ pool });It is possible to provide a pool size (i.e: number of workers), by default the number of available processors is used.
It doesn't seem that it's currently possible to do chunk decoding on web workers. A nice potential API would be to add some sort of pool to the get function.
This is also related to #296 about the comment:
with a fetch store, the requests are async but decompression is blocking
@aganders3 's solution was to implement their own web worker, but providing some sort of web worker pool API would mean that users could use main thread requests and not have to bundle their own workers.