Software Centre takes an age to load

I have a fast computer (great processor, good SSD) but Software Centre takes a good 30 seconds to load up. This isn't a whinge, I think there could be something wrong. Synaptic takes a second to load.

I ran strace software-center to see if it was thrashing the disk (it's an SSD - I can't hear it) and it's statting and attempting to open a whole shed-load of files. Here's an excerpt:

open("/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r1465-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r1465-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r1465-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)

This might be a red herring. Later on it pauses at this:

poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\v\0\0\0\3\0\0\0=\0\0\0\6\1s\0\7\0\0\0:1.3497\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 91
recvmsg(3, 0x7fff8c57cc00, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1\0\0\0\0\3\0\0\0{\0\0\0\1\1o\0\32\0\0\0/com/ubu"..., 144}, {"", 0}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 144
poll([{fd=3, events=POLLIN}], 1, 25000

And then it does it again... These two pauses account for most of the load time.

And then it really flips out with thousands of poll/read/temporarily unavailable lines.

So what on earth is going on here? Why is Software Centre scanning what looks to be any possible python package looking for StringIO? Bug?

Then why is it stalling at what looks like a web-request to something.ubuntu.com (can't see the full message)? Why is it talking to ubuntu.com anyway?


Solution 1:

It appears to be fetching a fully up-to-date view of available packages (like what apt-get update does), which can take a while depending on how far out of date the cache is, how quickly the software repositories respond, and the speed of your network connection.

As mentioned in the comments, this lack of interactivity while refreshing seems like a bug.