I didn't think this amounted to raising a github issue, but I just reached the limit of items in a storage scope and wondered why that is necessary?
I see here:
https://github.com/GrapheneOS/platform_frameworks_base/blob/e5bb14295289ec7dcc64a9968a80b86de7b5709b/core/java/android/app/StorageScope.java#L60-L66
that the time for the provider is O(n), where n is the number of items in the scope, but could that be made a configurable parameter or is that some kind of hard limit? Eg. you could set how many items could be in a storage scope, and there could be a warning text given that very large n could make the app slow down or crash or whatevs.
I searched here and didn't find any prior discussions on this, but in doing so maybe I see maybe i am using storage scopes wrong? Basically I am just using them to be able to send images on instagram/slack/etc. without having those apps have access to every file/image i have (as they request), which I thought from reading the docs was the purpose of the scopes. If so, it seems normal to want to have more than 20 items in a scope, since I don't necessarily want to keep 4 copies of every file in different folders.