Hi Ludo’ ,
I think I have addressed your comments. I have now implemented two separate code paths: - when the request is specific (i.e. the subid range has a start) we can traverse the tree logarithmically
- when the request is generic (i.e. the subid range does not have a start) the search is linear since all the nodes have to be visited worst case to avoid leaving empty spaces interleaved, that could actually evade requests
As for estimating the size of the input, I'm not sure I know
enough to answer this. My reasoning has been: in general the
number of possible subids (i.e. %subordinate-id-max -
%subordinate-id-min) is huge. The use case I have in mind for
subids is rootless podman, so how many users in average need to
use rootless containers on a system and how many subids are they
to request in average are two very good questions I don't know how
to answer yet, or where I could find data for. Let me know if you
have any idea.
Please let me know if this v5 looks ok, thank you a lot for your help. giacomo