Implement a new function get_subtype in DataStore
Is your feature request related to a problem? Please describe. Get_subtype gets a class type and returns all the subtypes of the class. We will add cache to store the previous returned values.
Depends on
- List issues that this one depends on.
Describe the solution you'd like For a given class, the function will traverse all valid types in _type_attribute, and add all class that is_subclass() return true to the returned subtype list. Get subtype should have an inner cache structure to store previous query and results.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context
- This is part of the data efficiency project
- This PR should be made to the
masterbranch. - After the data tuple class is finished, we may switch to a new branch for integration.
Just realized that cache is not easy to achieve because the type list in DataStore is dynamically updated
@J007X , this is a potential issue for improving efficiency