You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current cache structure have all LVs flattened in a dictionary and accesible with the vg_name and the lv_name in a tuple. So if we want to retrieve the LVs of a VG (relatively common operation), we have to loop through all the LVs and filter them by vg_name.
It would be better to fix the cache structure so that retrieving the list of LVs is not complicated and expensive as it is now.
Problem
Current cache structure have all LVs flattened in a dictionary and accesible with the vg_name and the lv_name in a tuple. So if we want to retrieve the LVs of a VG (relatively common operation), we have to loop through all the LVs and filter them by vg_name.
It would be better to fix the cache structure so that retrieving the list of LVs is not complicated and expensive as it is now.
Proposal
If we had something like this:
Then we could retrieve all LVs by just doing:
Or maybe something like this:
And store instances of this instead of VG namedtuples and LV named tuples raw. This is also a good candidate to be a dataclass.
The text was updated successfully, but these errors were encountered: