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
/// - Variants without the `_opt` suffix use default [`CodecOptions`](crate::array::codec::CodecOptions).
199
198
/// - **Experimental**: `async_` prefix variants can be used with async stores (requires `async` feature).
200
199
///
201
-
/// Additional methods are offered by extension traits:
200
+
/// Additional [`Array`] methods are offered by extension traits:
202
201
/// - [`ArrayShardedExt`] and [`ArrayShardedReadableExt`]: see [Reading Sharded Arrays](#reading-sharded-arrays).
203
-
/// - [`ArrayChunkCacheExt`]: see [Chunk Caching](#chunk-caching).
204
202
/// - [`[Async]ArrayDlPackExt`](ArrayDlPackExt): methods for [`DLPack`](https://arrow.apache.org/docs/python/dlpack.html) tensor interop.
205
203
///
204
+
/// [`ChunkCache`] implementations offer a similar API to [`Array::ReadableStorageTraits`](crate::storage::ReadableStorageTraits), except with [Chunk Caching](#chunk-caching) support.
205
+
///
206
206
/// ### Chunks and Array Subsets
207
207
/// Several convenience methods are available for querying the underlying chunk grid:
/// - Preferred where chunks are repeatedly *partially retrieved*.
303
+
/// - Useful for retrieval of inner chunks from sharded arrays, as the partial decoder caches shard indexes (but **not** inner chunks).
304
+
/// - Memory usage of this cache is highly dependent on the array codecs and whether the codec chain ([`Array::codecs`]) ends up decoding entire chunks or caching inputs. See:
305
+
/// - [`CodecTraits::partial_decoder_decodes_all`](crate::array::codec::CodecTraits::partial_decoder_decodes_all), and
/// `_elements` and `_ndarray` variants are also available.
326
+
///
317
327
/// Chunk caching is likely to be effective for remote stores where redundant retrievals are costly.
318
328
/// Chunk caching may not outperform disk caching with a filesystem store.
319
329
/// The above caches use internal locking to support multithreading, which has a performance overhead.
320
330
/// **Prefer not to use a chunk cache if chunks are not accessed repeatedly**.
321
-
/// Cached retrieve methods do not use partial decoders, and any intersected chunk is fully decoded if not present in the cache.
322
-
/// The encoded chunk caches may be optimal if dealing with highly compressed/sparse data with a fast codec.
323
-
/// However, the decoded chunk caches are likely to be more performant in most cases.
331
+
/// Aside from [`ChunkCacheTypePartialDecoder`]-based caches, caches do not use partial decoders and any intersected chunk is fully retrieved if not present in the cache.
324
332
///
325
333
/// For many access patterns, chunk caching may reduce performance.
0 commit comments