What’s the HDFGroup’s proposed path forward?
I see two approaches:
- Try to fix the performance bug in
H5S__hyper_merge_spans_helper
to ensure that it has the right algorithmic complexity when the trees are very unbalanced. I’d expect that by using bisection it should be possible to merge two selections of sizeN
andM
in timemax(log(max(N, M)), min(N, M))
. Meaning if one tree has sizeN
and we insert a single slab, i.e. the case for (some)H5Sselect_hyperslab
it runs in log-time, while merging two balanced trees runs in time proportional to the total number of elements. - Expect users to not use
H5Sselect_hyperslab
when merging hyperslabs in bulk and instead expect them to useH5Scombine_select
, e.g. in a manner similar to the workaround sketched above. This could be achieved by documenting the complexity ofH5Sselect_hyperslab
andH5Scombine_select
clearly and referring toH5Scombine_select
fromH5Sselect_hyperslab
. If so it would be very helpful ifH5Scombine_select
could be polished to allow combiningNONE
andALL
selections (see separate topic).