get_apt_pkg_cache is slowing update-manager down

Bug #2110300 reported by Nathan Teodosio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

I noticed a long time for Update Manager to "complete", that means, showing the available update list.

Profiling shows that the private function "get_apt_pkg_cache" from ubuntu-pro-client:/usr/lib/python3/dist-packages/uaclient/apt.py is called multiple times, summing up to 17 s delay.

--->
% python3 -m cProfile -s tottime ./update-manager
WARNING:root:can not import unity GI Namespace Dbusmenu not available
         9479342 function calls (9456814 primitive calls) in 35.130 seconds

   Ordered by: internal time

   ncalls tottime percall cumtime percall filename:lineno(function)
       48 17.232 0.359 18.049 0.376 apt.py:287(get_apt_pkg_cache)
        1 4.795 4.795 34.356 34.356 Gtk.py:1690(main)
        3 1.192 0.397 1.250 0.417 cache.py:203(open)
   417580 0.822 0.000 2.629 0.000 cache.py:308(__iter__)
        3 0.799 0.266 0.802 0.267 {built-in method time.sleep}
<---

Tags: noble
tags: added: noble
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.