Optimization of two underperforming functions
Based on @jheron's use case, we could single out two functions that take unnecessarily long time: _get_previous_record_of_basic_in_status
in timeline.py
and to_set
in compound.py
. First one is looking up the most recent record of certain characteristics, computing a reversed list of all records at all times. This seems like a relatively easy task to fix. Second one is creating a set of components from a subtree which root is the component on which the method is called. That one might be more intricate, but surely in some instances, the results can be e.g. cached.