software center stop working when I select system software for a long time

Bug #986186 reported by Alessandro on 2012-04-20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gtk+3.0 (Ubuntu)
software-center (Ubuntu)
Michael Vogt
Michael Vogt

Bug Description

Description: Ubuntu 11.10
Release: 11.10

1- Open Ubuntu software center
2-In the left menu select System
  then Ubuntu Software Center stop working for a long time (16s on my system)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: software-center 5.0.6
ProcVersionSignature: Ubuntu 3.0.0-17.30-generic-pae 3.0.22
Uname: Linux 3.0.0-17-generic-pae i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Fri Apr 20 15:23:35 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: software-center
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Alessandro (alessandrochelli) wrote :
Michael Vogt (mvo) on 2012-04-23
Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
milestone: none → precise-updates
description: updated
summary: - software center stop working when I select system software
+ software center stop working when I select system software for a long
+ time
Michael Vogt (mvo) wrote :

It seems like the following query is taking up a lot of time:
2012-04-23 17:17:26,615 - softwarecenter.performance - DEBUG - populate model from query: 'Xapian::Query((((((((((((((((((<alldocuments> AND_NOT ((<alldocuments> AND ACutility) AND_NOT ACaccessibility)) AND_NOT ((<alldocuments> AND ACaccessibility) AND_NOT ACsettings)) AND_NOT ... AND_NOT (<alldocuments> AND ACx-publication)) AND_NOT (AParmagetronad OR XParmagetronad OR APcalibre OR XPcalibre OR APcheese OR XPcheese OR APhomebank OR XPhomebank OR APstellarium OR XPstellarium OR APgimp OR XPgimp OR APinkscape OR XPinkscape OR APblender OR XPblender OR APaudacity OR XPaudacity OR APgufw OR XPgufw OR APfrozen-bubble OR XPfrozen-bubble OR APfretsonfire OR XPfretsonfire OR APmoovida OR XPmoovida OR APliferea OR XPliferea OR AParista OR XParista OR APgtg OR XPgtg OR APfreeciv-client-gtk OR XPfreeciv-client-gtk OR APsupertuxkart OR XPsupertuxkart OR APtumiki-fighters OR XPtumiki-fighters OR APtuxpaint OR XPtuxpaint OR APwebservice-office-zoho OR XPwebservice-office-zoho)) AND_NOT (<alldocuments> AND ATapplication)) AND_NOT (<alldocuments> AND ATapplication)) AND <alldocuments>))' (threaded: True): 17.0178701878

Now this supposed to be threaded and not hang the app at least :/ But that is in fact a red-herring. The bulk of the time
seems to be spend in on_query_complete() and in
 self.app_view.display_matches() there (15.6 of 17s). And that spends most time deep in "self.tree_view.set_model(model)" (

Michael Vogt (mvo) wrote :

So on my system it takes 14s for the Gtk.TreeView.set_model() call for a model with 37k entries - this looks like a regression from previous versions where with fixed-height mode we got decent performance even for big models list this.

Michael Vogt (mvo) wrote :

It appears to be a regression from oneiric, I ran it there (with some modification as the pygi in oneiric does not work with the software-center trunk) and the delay was not there.

Michael Vogt (mvo) wrote :

Looking further this is releated to the "column.set_cell_data_func()" we are using. This is called for each row, not just the visible ones.

Michael Vogt (mvo) wrote :

This is a regression from oneiric, the "cell_data" func is there only called for the visible rows. I tested with both s-c trunk and the oneiric version and added a print to the cell_data func. I will write a test-case next.

Michael Vogt (mvo) wrote :

I should add that even in a VM clicking on system on oneiric is almost instant.

Michael Vogt (mvo) wrote :

The following diff will disconnect the cell_data_func before seting the new model. This improves massively, but its still ~2s vs ~0.5s as it was in oneiric according to my tests in a VM.

Michael Vogt (mvo) wrote :

When I run this in precise I get nr_cell_data_func_calls ~20k on oneiric ~52.

Michael Vogt (mvo) wrote :

The difference in is something like 0.1s on oneiric vs ~2s on precise.

Michael Vogt (mvo) wrote :

My current suspicion is rev "d56babefb4efb4f08e0fbbd0be7aa9099aae1cfd" as its a pretty big rework of the cellarea stuff

tags: added: patch
Changed in gtk:
importance: Unknown → Medium
status: Unknown → New
Michael Vogt (mvo) wrote :

So this appears to be settings releated (maybe a11y?). It is not a issue for all users, i.e. its not reproducable in the guest session so its probably not a regression either but a bug that was there for some time (this explains why it was reported on 11.10).

Michael Vogt (mvo) on 2012-04-25
Changed in software-center (Ubuntu):
status: Confirmed → In Progress
status: In Progress → Fix Committed
Changed in software-center (Ubuntu):
assignee: nobody → Michael Vogt (mvo)

Hello Alessandro, or anyone else affected,

Accepted software-center into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

Changed in software-center (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Gary Lasker (gary-lasker) wrote :

I verified this fix in software-center version 5.2.1 in precise-proposed per the steps to reproduce in the description. On my system, it takes only about ~1s for the contents of the System category to be displayed.

Many thanks!

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.2.1

software-center (5.2.1) precise-proposed; urgency=low

  [ Michael Vogt ]
  * lp:~mvo/software-center/lp977179:
    - make the review UI react correctly to conditions of network
      availability (LP: #977179)
  * lp:~mvo/software-center/fix-crash-deb-file-size-calc:
    - fix crash when installing a deb file that is not found in
      the current apt cache
  * lp:~mvo/software-center/lp981992:
    - fix a crash in the new a11y code if there is a row that has
      no data or is not yet preloaded (LP: #981992)
  * lp:~mvo/software-center/fix-gmenu-searcher:
    - fix the menu searcher for non-Unity configurations after
      the app-install-data-ubuntu file layout changed
  * lp:~mvo/software-center/lp808455:
    - trivial fix for crash on downstream distros (LP: #808455)
  * lp:~mvo/software-center/lp927262:
    - fix crash when get_vadjustment() returns None (LP: #927262)
  * lp:~mvo/software-center/utf8-fixes:
    - fix various utf8-related crashes (LP: #943500, LP: #922225,
      LP: #917755)
  * lp:~mvo/software-center/gwibber-utf8-lp985255:
    - fix a utf8 crash in the gwibber integration (LP: #985255)
  * lp:~mvo/software-center/workaround-gtk-regression-lp986186:
    - workaround performance issue with the Gtk.TreeView.set_model()
      call when there is a cell_data_func attached. Not every user is
      affected (settings dependant somehow), but when affected it causes
      a massive performance degration for huge list models like "System"
      (LP: #986186). This branch works around the problem by disconnecting
      the cell_data_func before setting the new model.
  * lp:~mvo/software-center/fix-clear-credentials-race:
    - fix an incorrect use of the sso dbus backend, we now correctly
      wait until it emits a CredentialsCleared signal (LP: #986117)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/add-to-launcher-after-auth-lp972710:
    - fix bug where an application will be added to the Unity launcher
      in the case where the user cancels the installation auth dialog
      (LP: #972710)
  * lp:~gary-lasker/software-center/recommendations-sso-login-lp973612:
    - fix bug where the recommendations opt-in panel is hidden if
      the user declines the SSO dialog after opting in (LP: #973612)
    - fix the user experience if the user has previously opted-in to
      recommendations and their SSO token is found have been removed
      or revoked or otherwise found to be invalid (LP: #967064)
    - improve the responsiveness of the spinner in the recommendations
 -- Michael Vogt <email address hidden> Thu, 26 Apr 2012 09:47:19 +0200

Changed in software-center (Ubuntu Quantal):
status: Fix Committed → Fix Released
Changed in software-center (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in gtk+3.0 (Ubuntu Quantal):
importance: Undecided → Low
Changed in gtk+3.0 (Ubuntu Precise):
importance: Undecided → Low
status: New → Triaged
Changed in gtk+3.0 (Ubuntu Quantal):
status: New → Triaged
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in gtk+3.0 (Ubuntu Quantal):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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