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
1=== modified file 'softwarecenter/ui/gtk3/app.py'
2--- softwarecenter/ui/gtk3/app.py 2012-02-16 14:17:38 +0000
3+++ softwarecenter/ui/gtk3/app.py 2012-02-28 14:04:20 +0000
4@@ -1175,8 +1175,10 @@
5 # if the pkg is installed, show it in the installed pane
6 if (app.pkgname in self.cache and
7 self.cache[app.pkgname].installed):
8- self.installed_pane.init_view()
9- self.installed_pane.show_app(app)
10+ with ExecutionTime("installed_pane.init_view()"):
11+ self.installed_pane.init_view()
12+ with ExecutionTime("installed_pane.show_app()"):
13+ self.installed_pane.show_app(app)
14 else:
15 self.available_pane.init_view()
16 self.available_pane.show_app(app)
17
18=== modified file 'softwarecenter/ui/gtk3/panes/softwarepane.py'
19--- softwarecenter/ui/gtk3/panes/softwarepane.py 2012-02-16 14:14:01 +0000
20+++ softwarecenter/ui/gtk3/panes/softwarepane.py 2012-02-28 14:04:20 +0000
21@@ -179,17 +179,16 @@
22 if not "SOFTWARE_CENTER_DEBUG_TABS" in os.environ:
23 self.notebook.set_show_tabs(False)
24 self.notebook.set_show_border(False)
25- # an empty notebook, where the details view will eventually go
26- self.details_notebook = Gtk.Notebook()
27- self.details_notebook.set_show_border(False)
28 # make a spinner view to display while the applist is loading
29 self.spinner_view = SpinnerView()
30 self.spinner_notebook = Gtk.Notebook()
31- self.spinner_notebook.set_show_tabs(False)
32+ if not "SOFTWARE_CENTER_DEBUG_TABS" in os.environ:
33+ self.spinner_notebook.set_show_tabs(False)
34 self.spinner_notebook.set_show_border(False)
35- self.spinner_notebook.append_page(self.notebook, None)
36- self.spinner_notebook.append_page(self.details_notebook, None)
37- self.spinner_notebook.append_page(self.spinner_view, None)
38+ self.spinner_notebook.append_page(self.notebook,
39+ Gtk.Label("view"))
40+ self.spinner_notebook.append_page(self.spinner_view,
41+ Gtk.Label("spinner"))
42
43 self.pack_start(self.spinner_notebook, True, True, 0)
44

Subscribers

People subscribed via source and target branches