-
Notifications
You must be signed in to change notification settings - Fork 76
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
Improve performances #905
Improve performances #905
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,7 +272,7 @@ def ordered_members_map(self): | |
This function only caches the map value, to see what the map is used for, see value_nth_person method. | ||
""" | ||
if self._ordered_members_map is None: | ||
return np.argsort(self.members_entity_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also need to reset the cache to None in |
||
self._ordered_members_map = np.argsort(self.members_entity_id) | ||
return self._ordered_members_map | ||
|
||
def get_role(self, role_name): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,6 +158,7 @@ def purge_cache_of_invalid_values(self): | |
for (_name, _period) in self.invalidated_caches: | ||
holder = self.get_holder(_name) | ||
holder.delete_arrays(_period) | ||
self.invalidated_caches = set() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! |
||
|
||
def calculate_add(self, variable_name, period): | ||
variable = self.tax_benefit_system.get_variable(variable_name, check_existence = True) | ||
|
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.