Merge lp:~mvo/software-center/installed-view-speedup into lp:software-center

Proposed by Michael Vogt
Status: Merged
Merged at revision: 2787
Proposed branch: lp:~mvo/software-center/installed-view-speedup
Merge into: lp:software-center
Diff against target: 43 lines (+10/-9)
2 files modified
softwarecenter/ui/gtk3/app.py (+4/-2)
softwarecenter/ui/gtk3/panes/softwarepane.py (+6/-7)
To merge this branch: bzr merge lp:~mvo/software-center/installed-view-speedup
Reviewer Review Type Date Requested Status
Gary Lasker (community) Approve
Review via email: mp+94952@code.launchpad.net

Description of the change

Small branch that removes a unused notebook that causes massive slowdown in the startup when
calling with a already installed package. Speedup for me is from 34s to 3s until the details
are visible (hot cache!).

To post a comment you must log in.
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Definitely don't need that extra notebook! Seems weird that that was left in!

One thing though, on my machine I can't seem to see the speedup you are observing. I am opening a deb for a package that I already have installed, but it doesn't seem appreciably faster after the merge. I suspect I am not checking the correct thing? Could you give a quick test case so I can make sure. Thanks!

In any case, it's definitely a nice piece of cleanup and I will merge it now. Thanks mvo!!

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

On Wed, Feb 29, 2012 at 07:16:16AM -0000, Gary Lasker wrote:
> Review: Approve
>
> Definitely don't need that extra notebook! Seems weird that that was left in!

Great, thanks for double checking.

> One thing though, on my machine I can't seem to see the speedup you are observing. I am opening a deb for a package that I already have installed, but it doesn't seem appreciably faster after the merge. I suspect I am not checking the correct thing? Could you give a quick test case so I can make sure. Thanks!

Sure, so I did: "software-center apt" and waited until that was
displayed in the details view. That took a long time before and got
much quicker with the removal of the extra notebook.

> In any case, it's definitely a nice piece of cleanup and I will merge it now. Thanks mvo!!

Thanks for the merge.

Cheers,
 Michael

Revision history for this message
Gary Lasker (gary-lasker) wrote :

Ahh, ok! I can see the speedup now, and indeed, it is dramatic!! Nice. :D

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwarecenter/ui/gtk3/app.py'
--- softwarecenter/ui/gtk3/app.py 2012-02-16 14:17:38 +0000
+++ softwarecenter/ui/gtk3/app.py 2012-02-28 14:04:20 +0000
@@ -1175,8 +1175,10 @@
1175 # if the pkg is installed, show it in the installed pane1175 # if the pkg is installed, show it in the installed pane
1176 if (app.pkgname in self.cache and 1176 if (app.pkgname in self.cache and
1177 self.cache[app.pkgname].installed):1177 self.cache[app.pkgname].installed):
1178 self.installed_pane.init_view()1178 with ExecutionTime("installed_pane.init_view()"):
1179 self.installed_pane.show_app(app)1179 self.installed_pane.init_view()
1180 with ExecutionTime("installed_pane.show_app()"):
1181 self.installed_pane.show_app(app)
1180 else:1182 else:
1181 self.available_pane.init_view()1183 self.available_pane.init_view()
1182 self.available_pane.show_app(app)1184 self.available_pane.show_app(app)
11831185
=== modified file 'softwarecenter/ui/gtk3/panes/softwarepane.py'
--- softwarecenter/ui/gtk3/panes/softwarepane.py 2012-02-16 14:14:01 +0000
+++ softwarecenter/ui/gtk3/panes/softwarepane.py 2012-02-28 14:04:20 +0000
@@ -179,17 +179,16 @@
179 if not "SOFTWARE_CENTER_DEBUG_TABS" in os.environ:179 if not "SOFTWARE_CENTER_DEBUG_TABS" in os.environ:
180 self.notebook.set_show_tabs(False)180 self.notebook.set_show_tabs(False)
181 self.notebook.set_show_border(False)181 self.notebook.set_show_border(False)
182 # an empty notebook, where the details view will eventually go
183 self.details_notebook = Gtk.Notebook()
184 self.details_notebook.set_show_border(False)
185 # make a spinner view to display while the applist is loading182 # make a spinner view to display while the applist is loading
186 self.spinner_view = SpinnerView()183 self.spinner_view = SpinnerView()
187 self.spinner_notebook = Gtk.Notebook()184 self.spinner_notebook = Gtk.Notebook()
188 self.spinner_notebook.set_show_tabs(False)185 if not "SOFTWARE_CENTER_DEBUG_TABS" in os.environ:
186 self.spinner_notebook.set_show_tabs(False)
189 self.spinner_notebook.set_show_border(False)187 self.spinner_notebook.set_show_border(False)
190 self.spinner_notebook.append_page(self.notebook, None)188 self.spinner_notebook.append_page(self.notebook,
191 self.spinner_notebook.append_page(self.details_notebook, None)189 Gtk.Label("view"))
192 self.spinner_notebook.append_page(self.spinner_view, None)190 self.spinner_notebook.append_page(self.spinner_view,
191 Gtk.Label("spinner"))
193 192
194 self.pack_start(self.spinner_notebook, True, True, 0)193 self.pack_start(self.spinner_notebook, True, True, 0)
195194

Subscribers

People subscribed via source and target branches