Optimize resolve request to PackageKit
As part of https://github.com/PackageKit/PackageKit/pull/744, I noticed that GS is doing a resolve
transaction on lot of apps during startup.
(n=15)
in the below PK transaction log denotes that 15 packages are being resolved in that query.
If n=1
, the exact package name is printed rather than (n=1)
. E.g: /6_beccaded
where n=1
.
PK transaction log during startup:
Apr 23 17:23:10 linux PackageKit[39494]: resolve transaction /1_aedeeece (n=15) from uid 1010 finished with success after 880ms
Apr 23 17:23:11 linux PackageKit[39494]: resolve transaction /2_aeabcabd (n=128) from uid 1010 finished with success after 872ms
Apr 23 17:23:12 linux PackageKit[39494]: resolve transaction /3_dbbbdeae (n=45) from uid 1010 finished with success after 856ms
Apr 23 17:23:13 linux PackageKit[39494]: resolve transaction /4_aacdbebe (n=20) from uid 1010 finished with success after 814ms
Apr 23 17:23:14 linux PackageKit[39494]: resolve transaction /5_baaadcee (n=11) from uid 1010 finished with success after 837ms
Apr 23 17:23:14 linux PackageKit[39494]: resolve transaction /6_beccaded (geary) from uid 1010 finished with success after 797ms
Apr 23 17:23:15 linux PackageKit[39494]: resolve transaction /7_eecccabc (n=36) from uid 1010 finished with success after 922ms
Apr 23 17:23:16 linux PackageKit[39494]: resolve transaction /8_ddaeeabe (n=311) from uid 1010 finished with success after 870ms
Apr 23 17:23:17 linux PackageKit[39494]: resolve transaction /9_bdeaeeee (n=189) from uid 1010 finished with success after 890ms
Apr 23 17:23:18 linux PackageKit[39494]: resolve transaction /10_bdcbdeba (n=453) from uid 1010 finished with success after 906ms
Apr 23 17:23:19 linux PackageKit[39494]: resolve transaction /11_dcaacead (n=497) from uid 1010 finished with success after 998ms
Apr 23 17:23:20 linux PackageKit[39494]: resolve transaction /12_ceadecda (n=17) from uid 1010 finished with success after 840ms
Apr 23 17:23:21 linux PackageKit[39494]: resolve transaction /13_caceabda (n=431) from uid 1010 finished with success after 893ms
Apr 23 17:23:22 linux PackageKit[39494]: resolve transaction /14_aacbabcd (gnome-software) from uid 1010 finished with success after 964ms
Apr 23 17:23:23 linux PackageKit[39494]: get-updates transaction /15_eccdadec from uid 1010 finished with success after 1690ms
Apr 23 17:23:25 linux PackageKit[39494]: get-updates transaction /16_ccbabebc from uid 1010 finished with success after 1782ms
Apr 23 17:23:26 linux PackageKit[39494]: resolve transaction /17_bbddabee (n=135) from uid 1010 finished with success after 899ms
One thing which is obvious is that resolve
transaction takes almost constant time. /6_beccaded
resolve of geary
app takes roughly the same time as /11_dcaacead
where 497 packages are resolved.
If these metrics are indeed correct, is it possible to optimize the number of resolve operations here (meaning resolve more packages in a single PK transaction) ?