Process index and save to database while downloading (not after)
Right now when updating repositories, F-Droid will:
- Download an
index.jar
file. - Once downloading is complete, extracts the
index.xml
. - Then it parses the
index.xml
looking for apps and persist them to the database.
If we could unzip the index.jar
and process the index.xml
file as it is being downloaded, then it should be much much faster. The reason is because saving to the database is slow, but retrieving information from the network is even slower. The CPU and Disk on devices will have a lot of idle time while waiting for network that they could instead spend on saving data to the database.
Edited by Hans-Christoph Steiner