Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
142 stars 69 forks source link

Improve S3 Zarr performance #1300

Closed tdrwenski closed 7 months ago

tdrwenski commented 7 months ago

Description of Changes

There is no way to control the order of the IOSP classes loaded by the ServiceLoader. This can result in very slow performance for S3 Zarr files, since many IOSPs will want to read the data to check if it is a valid file of their type. The ZarrIosp check is super fast since it only needs to check whether its Raf is a directory type.

I propose to add a new method to the IOServiceProvider interface that will sort the IOSPs into two (or later more) groups so that the fast/common IOSPs can be checked first and the rest checked later.