forte icon indicating copy to clipboard operation
forte copied to clipboard

Implement a new function get_subtype in DataStore

Open qinzzz opened this issue 3 years ago • 2 comments

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 master branch.
  • After the data tuple class is finished, we may switch to a new branch for integration.

qinzzz avatar Apr 28 '22 00:04 qinzzz

Just realized that cache is not easy to achieve because the type list in DataStore is dynamically updated

qinzzz avatar May 04 '22 07:05 qinzzz

@J007X , this is a potential issue for improving efficiency

hunterhector avatar Dec 22 '22 18:12 hunterhector