Peter Krempa 4865dd673d qemu*xml2*test: Cache capabilities between tests
Invoking the XML parser every time is quite expensive. Since we have a
deep copy function for 'virQEMUCapsPtr' object, we can cache the parsed
results lazily.

This brings significant speedup to qemuxml2argvtest:

real	0m2.234s
user	0m2.140s
sys	0m0.089s

vs.

real	0m1.161s
user	0m1.087s
sys	0m0.072s

qemuxml2xmltest benefits too:

real	0m0.879s
user	0m0.801s
sys	0m0.071s

vs.

real	0m0.466s
user	0m0.424s
sys	0m0.040s

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2021-02-20 13:28:50 +01:00
..
2020-06-10 14:00:38 +02:00
2019-10-15 11:25:25 +02:00
2020-07-10 09:40:58 +02:00
2020-02-24 23:15:50 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2020-06-10 14:00:38 +02:00
2021-02-10 13:37:12 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2020-11-27 16:28:31 +01:00
2019-10-15 11:25:25 +02:00
2020-02-24 23:15:50 +01:00