Skip to content

Improve cf.Field.__getitem__ performance by not re-calculating axis cyclicity #744

@davidhassell

Description

@davidhassell

Currently (v3.16.1), the cyclicty of all axes with dimension coordinates is checked during a Field subspace. This likely entails getting the first and last values if the coordinates, which might be very slow if the values are on (a remote) disk, or need computing.

However, the cyclicity is already known on the subspaced field's Data object (cf.Data._getitem__ updates it), so we can just take it from there and disable the expensive automatic cyclicity check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceRelating to speed and memory performance

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions