On 26.02.2015 15:17, Michal Privoznik wrote:
<snip/>
BTW: I've done some testing locally and it helped me to find a bug in my
patches (I've just proposed the diff to be squashed in). Basically, my
test program defines 10 dummy networks, and spawns a thread over each
one of them. The thread does 1000 iterations of some network API calls,
e.g. define, undefine, start, destroy, IsActive, IsPersistent, and so
on. And the results are astonishing:
Without my patches:
$ time ./test_network_lock qemu+tcp://localhost/system
Connected. Starting workers ...
Waiting for workers to end ...
real 0m54.083s
user 0m1.317s
sys 0m1.302s
With my patches:
$ time ./test_network_lock qemu+tcp://localhost/system
Connected. Starting workers ...
Waiting for workers to end ...
real 0m42.355s
user 0m1.231s
sys 0m1.324s
So nearly 12 seconds speed up! The test program can be found at [1].
Michal
1:
http://fpaste.org/191340/