Skip to content

Improve performance related to cf.Field.autocylcic #903

@davidhassell

Description

@davidhassell

Now that we have #851 (Improve detection of cyclic axes), I realise that we no longer need to run cf.Field.autocyclic during cf.Field.set_construct, because autocyclic will get end up being run anyway, if required, whenever cf.Field.cyclic() is called.

This doesn't change any functionality, but will speed up the reading of remote datasets. Currently, even if you set cache=False to cf.read, set_construct ends up accessing the cyclic axis bounds values from the dataset, which can be slow.

Pushing the overhead of autocyclic to when cyclicity is actually needed makes sense because i) you may well not need that information in your workflow and ii) the overhead of the operation will likely make the autocyclic overhead not seem so bad.

Note that once autocyclic has been run once, it caches the values it need from disk, so is faster the next time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataset readRelating to reading datasetsenhancementNew feature or requestperformanceRelating to speed and memory performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions