From 2510fdec489527000de9b58b3a6b503ff4d90ad7 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 21 Feb 2015 06:24:18 +0100 Subject: Speed up ungrouping test, adding note as to why it is so slow. (bzr r13933) --- src/object-test.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/object-test.h b/src/object-test.h index d6a9dbbd3..4fd3d67b5 100644 --- a/src/object-test.h +++ b/src/object-test.h @@ -178,7 +178,7 @@ public: Inkscape::XML::Document *xml_doc = node->document(); TS_TRACE("Benchmarking groups..."); - const size_t num_elements = 10000; + const size_t num_elements = 2000; Inkscape::XML::Node *new_group = xml_doc->createElement("svg:g"); Inkscape::GC::release(new_group); @@ -208,6 +208,7 @@ public: end = clock(); std::cout << "Took " << double(end - begin) / double(CLOCKS_PER_SEC) << " seconds to ungroup a with " << num_elements << " elements\n"; + std::cout << " Note: sp_item_group_ungroup_handle_clones() is responsible\n for most of the time as it is linear in number of elements\n which results in quadratic behavior for ungrouping." << std::endl; begin = clock(); // Remove those elements -- cgit v1.2.3