Conversation
|
Context: Analysis of building cubes with rules gave roughly these proportions of time percentage for a simple iris.load_raw call.... This PR addresses the last of these areas. |
|
Test results: Testing with a standard test-data file... Results: |
lib/iris/fileformats/rules.py
Outdated
There was a problem hiding this comment.
Not your doing but this needs fixing.
|
Travis test failed due to CF standard-namers-table glitch (believed now fixed). |
|
discussion relating to coord-dim association is ongoing and may effect this PR, see #587 |
|
I see nobody is assigned, I'm happy to review, change PR description to reflect this |
There was a problem hiding this comment.
This checks whether the coordinate is already 'used', however the more information checked against, the more often that it will correctly determine the answer, thus bypass the more hungry coordinate search (cube.coord). Why not also add 'var_name' here to catch more cases?
|
I think we can achieve the same optimisation without accessing private methods or adding to the API ... Instead of adding coordinates on to an existing cube, we modify the field-to-cube conversion to collect all the coordinates it makes and pass them to the Cube constructor via the existing |
See #637 (and SciTools/iris-code-generators#8). |
|
I'm closing this because (thanks to hindsight) we've basically extracted the benefit via #637. If there are remaining benefits which have not been addressed elsewhere then please do submit a new PR. |
Defines + uses lower-level versions of cube.add_(dim/aux)_coord.
Produces a speedup to cubes construction in import, with a small improvement (~10%) to overall load speeds.