Le vendredi 02 mars 2012, à 10:41 +0100, Duncan Mac-Vicar P. a écrit :
On 03/01/2012 05:39 PM, Vincent Untz wrote:
I've looked very quickly, and we need some major rework there as it apparently queries packagekit for all applications, and it takes something like 1 or 2 seconds per application. So it's extremely slow, and on top of that, packagekitd blows up after a while (with what looks like a memory leak going on).
I was reading softwarecenter/db/update.py and it looks like it parses the appdata.xml and writes the xapian database. What query does it then to PackageKit?
For each application in the xml, we have a package name. And for each package name, the codes calls: - resolve (to get a packageid, so we know the package exists) - get_details (to get a description of the package) That's really this code, from index_app_info_from_parser: # add data from the apt cache if pkgname in cache and cache[pkgname].candidate: s = cache[pkgname].candidate.summary term_generator.index_text_without_positions(s, WEIGHT_APT_SUMMARY) s = cache[pkgname].candidate.description term_generator.index_text_without_positions(s, WEIGHT_APT_DESCRIPTION) Using cache[pkgname].candidate and cache[pkgname].candidate.description actually triggers functions to fetch those properties. It's also worth noting that the "if pkgname in cache" is mis-implemented in the packagekit backend, since it returns true, unless a previous lookup for the package failed... Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-softwaremgmt+owner@opensuse.org