Open
Description
Feature description
Right now all properties are computed every time they are called. We should implement a caching mechanism by which the computed values are stored the first time they are computed.
Proposed solution
We should implement a decorator, e.g. cached_property
, that stores computed properties into a global dict cache if they are not found in the cache. We should also implement a second decorator invalidates_cached_properties(property_names)
that removes data from the cache whenever a function is run that invalidates some property (e.g. rescaling the area of a polygon invalidates the moment of inertia calculation).
Metadata
Metadata
Assignees
Labels
No labels