[feature] [APKINDEX spec] Optional JSON(?) index
apk is pretty slow on underpowered hardware. i've been doing a bunch of bash to get around the problem myself, because i've found that a JSON file made by just directly looking at the world file takes longer to build, but is much faster to query info from. it'd be very nice if there was something like that for the APKINDEX spec, such that you could search the cache for a package faster than you could by only using apk.
the main reason this appears to be a lot faster than normal is that you don't have to handle more than one file. i haven't looked deep into the source yet, (god rest my soul for not knowing C,) but it's obvious you have to extract the archive to get at the APKINDEX files inside, then merge them in some way that lets you query all of them.
handling one plaintext file means that these steps don't have to be done, so you don't have to work quite as hard to get this information.
a sample of what handling the index with a JSON file could look like:
time
output comparing using apk vs querying a json made from /etc/apk/world:
the single file doesn't necessarily have to be JSON, there's likely other options to do this, but this was the first thought that came to me when solving the problem on my own time.