Created by Dylan McCall and last modified
Get this branch:
bzr branch lp:~dylanmccall/update-manager/bug-1195573
Only Dylan McCall can upload to this branch. If you are Dylan McCall please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Dylan McCall
Software Updater

Recent revisions

2630. By Dylan McCall

Use the "application-x-executable" icon if an application does not have an icon of its own (LP: #1195573)

2629. By Martin Pitt

Drop unused system-software-update icons since it is a
standard theme icon

2628. By Martin Pitt

releasing version 1:0.188

2627. By Martin Pitt

tests/test_update_list.py: Fix too long line (pep8 error).

2626. By Martin Pitt

Core/UpdateList.py: Drop unused "src_name" variable (pyflakes error).

2625. By Brian Murray

releasing version 1:0.187

2624. By Brian Murray

Remove check for update-notifier auto-launch gsettings key

2622. By Martin Pitt

Drop unnecessary ubuntu-drivers-common build dependency, to ease

2621. By Michael Terry

Implement various solutions to speed up the group calculation.

1. Create a set of recursive dependencies for each app group.
   The previous implementation traversed the dependency tree until a dependency
   was found (if there was one) and repeated the same procedure for every
   package. Software Updater spent most of it's time doing the same thing again
   and again.

   This branch traverses the dependency tree once and stores the data in a set
   (for automatic deduplication). The cache is initiated during first call to
   is_dependency and expanded with new items as new packages are added to the
   group. Once the cache is created, it's just a matter of simple "pkg in deps"
   test to see if the package is a dependency of an application in that group.

2. Don't glob /usr/share/app-install/desktop/ for every package.
   Instead, glob the directory once and save the URIs of desktop files that
   have an upgradeable package associated with them. These URIs are later added
   to the list of desktop_files in _get_application_for_package.

3. Cache package dependencies.
   When the package dependencies are calculated for the first time, the data is
   saved to a dict shared between groups. The cached data is used in the
   consequent queries for that same package (in other app groups). It's faster
   to fetch a list of strings from a dict than it's to iterate Dependency
   objects to get the package names.

4. Speed up _file_is_application.
   Make _file_is_application to return false right away if the file name
   doesn't have a .desktop extension.

   The old version was spending a lot of time checking whether file was located
   in a known application directory and then returned false because it didn't
   have a .desktop extension. As this is called for every file in every
   upgradeable package, the performance impact was substantial.

5. Don't spin main loop on every call to _add_deps.
   _add_deps is invoked thousands of times in a few seconds and the UI
   doesn't need to be updated every time. As _add_deps doesn't take ages to
   complete it's enough to spin the loop once in a while. That'll be enough to
   keep the UI alive.

6. Remove useless sorting by source package in _make_groups.
   The list of packages was first sorted by source but that information was
   never used. The useless nested loops were removed.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.