← Back to team overview

software-store-developers team mailing list archive

Re: Speeding up software center load times

 

On Sun, Oct 07, 2012 at 04:51:11PM -0700, Timothy Arceri wrote:
> Hi Guys,
Hi Timothy,

>             Due to time constraints I tend to limit my open source contributions to resolve personal annoyances. Lately I've turned my attention to the startup times on the Ubuntu Software Center which although is slightly better than when it was first release still takes far to long to load on my Netbook. 
> 
> 
> Anyway I'm tackling this one performance issue at a time and the first one that has come to my attention is that the software center is slow to load a Python pickle file that has been generated by apt-xapian-index. This file simply contains a serialized python dictionary and therefore its possible to use a more optimized serialization module than pickle. 
> 
> My suggestion is to replace pickle with msgpack which reduces load time (save times are also increased using msgpack ) on my machine from 1.4 seconds to 0.1 seconds also it reduces the filesize from 3.1MB to 1.7MB.

Woah, that sounds like a pretty impressive improvement. Thanks a bunch
for looking into this. 

> Obviously the drawback from my proposal is that it introduces a new dependency: msgpack-python 
> 

Unfortunately we are too late for the 12.10 release as the new
dependency needs to get a main approval first and get on the CD
etc. But as soon as 13.04 opens we can switch

> I have submitted a patch upstream to apt-xapian-index to make this change: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689717

Looks like Enrico did not have the time yet to look at this, I am
happy to merge this myself, we may need a compatibilty pickle file for
some time and also convert the old data over. But that is probably
straightforward :)

> Anyway I would appreciate some feedback on the likely hood of adopting this improvement before I move on to tracking down further bottlenecks in software center.

I would certainly love to help with finding more bottlenecks. There is
a bit of helper code availalbe:
with ExecutionTime("description"):
     codeblock
for example and "software-center --debug-filter=performance" should
give some useful hints on areas that are slow.



Cheers,
 Michael


Follow ups

References