[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/plugins/pathshapes/enhancedpath
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2010-10-19 6:02:47
Message-ID: 20101019060247.3F4CDAC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1187367 by zachmann:

use stack.reserve(3) here so that the stack is not resized all the time
this reduces the number of a/de/re-llocations for documents with
a lot of enhanced path shapes quite a lot.

In the used test document the number of a/de/re-llocations are reduced by
25%-50% for the various objects.



 M  +4 -0      EnhancedPathFormula.cpp  


--- trunk/koffice/plugins/pathshapes/enhancedpath/EnhancedPathFormula.cpp #1187366:1187367
@@ -126,6 +126,10 @@
     }
 
     QStack<QVariant> stack;
+    // stack.reserve(3) here so that the stack is not resized all the time
+    // this reduces the number of a/de/re-llocations for documents with 
+    // a lot of enhanced path shapes quite a lot.
+    stack.reserve(3);
     int index = 0;
 
     if (!m_valid) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic