Speed up circus 10 times for many sockets

In one of the depolyments we deal with thousands of sockets. This patch makes circus cope with that with a reasonable speed.