jyio / botbrew-gui

Android GUI for BotBrew
49 stars 19 forks source link

do not refresh the entire SQLite table if the package lists have not changed #7

Closed jyio closed 12 years ago

jyio commented 12 years ago

Refreshing the entire SQLite table is expensive, and unnecessary if all the user did was install/remove/upgrade packages. In this case, we only need to update the status of the installed packages.

jyio commented 12 years ago

If the apt database was not updated, there's no need to completely reconstruct the SQLite table. Instead, we zero everyone's installed/upgradable columns and update them only for packages that are currently installed. This results in a much smaller update in these cases.