~mvo/software-center/refactor

« back to all changes in this revision

Viewing changes to softwarecenter/apt/aptcache.py

  • Committer: Michael Vogt
  • Date: 2010-11-23 15:43:54 UTC
  • mfrom: (1303.1.6 startup-speed)
  • Revision ID: michael.vogt@ubuntu.com-20101123154354-ja3ebtn4arlvql98
mergedĀ fromĀ lp:~mvo/software-center/startup-time

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
    def open(self):
102
102
        self._ready = False
103
103
        self.emit("cache-invalid")
104
 
        if self._cache == None:
105
 
            self._cache = apt.Cache(GtkMainIterationProgress())
106
 
        else:
107
 
            self._cache.open(GtkMainIterationProgress())
 
104
        with ExecutionTime("open the apt cache (in event loop)"):
 
105
            if self._cache == None:
 
106
                self._cache = apt.Cache(GtkMainIterationProgress())
 
107
            else:
 
108
                self._cache.open(GtkMainIterationProgress())
108
109
        # installed_count stats
109
110
        with ExecutionTime("installed_count stats"):
110
111
            self.installed_count = 0