-
Notifications
You must be signed in to change notification settings - Fork 66
several tweaks, mainly saving method results for re-use, to improve #1752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
performance of climatology etc. on Rhea or other machines where I/O is expensive.
# For isTime(), keep track of whether each id is for a time axis or not, for better performance. | ||
# This dictionary is a class variable (not a member of any particular instance). | ||
idtaxis = {} # id:type where type is 'T' for time, 'O' for other | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@painter1 what happens if you have mutliple files with same axis id, but only some are actually time? Wouldn't this break? I'm thinking auto generated arrays axis_0 etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would break! I've never seen such a thing, but among the changes I've made, this is the one which I was least sure about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should add a test? See if it's already in and if it is and type changes, throw a warning/error? I don't think it will ever happen but of course now that I said it it is bound to happen...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of this is to not have to figure out what the type is - that involves reading from a file. So the way I would fix it is to use self.idtaxis only if the user does something to enable this feature, e.g. calls a method to initialize it.
we are now caching this after first use
I will have a look at it for review. |
Is this good enough to be merged? We need this for release 2.4.1, and the code freeze is tomorrow. |
@painter1 it looks good to me, certain code I couldn't reasonably test since its very specific but overall its good. +2 |
Our Mac bots are hosed but I am okay if we merge it as it is. |
several tweaks, mainly saving method results for re-use, to improve
performance of climatology etc. on Rhea or other machines where I/O
is expensive.
WORK IN PROGRESS DO NOT MERGE YET