Skip to content

Control setting and display of cached data elements #913

@davidhassell

Description

@davidhassell

When the array being passed to cf.Data.__init__ is not a Dask array and is in memory, why don't we grab the first (, second) and last values for the cache, as it's much quicker to do it at this time than hauling them out of the instantiated Dask array at a later stage.

At the same time, we can provide a function cf.display_data that allows the user to not display first (, second) and last values during dump, str or repr, unless they're in the cache.

This means that you can still inspect the data even when computing the display values takes forever and a day.

Most of the heavy lifting for this will be provided by cfdm via NCAS-CMS/cfdm#363.

PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformanceRelating to speed and memory performance

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions