Avoid slow Array grow operation
authorStefan Vogel <sv@exept.de>
Fri, 01 Oct 2010 17:41:05 +0200
changeset 2798 dac473a7fcdf
parent 2797 06bae3d05b78
child 2799 8c571b88b81f
Avoid slow Array grow operation
MenuEditor.st
--- a/MenuEditor.st	Mon Sep 20 13:33:51 2010 +0200
+++ b/MenuEditor.st	Fri Oct 01 17:41:05 2010 +0200
@@ -5360,8 +5360,9 @@
         list := MenuEditor imageRetrieverClasses asList.
         builder aspectAt:#retrieverList put:list.
     ].
-    (masterApplication notNil and:[ (cls := masterApplication specClass) notNil]) ifTrue:[
-        ^ (Array with:cls),list
+    (masterApplication notNil 
+     and:[(cls := masterApplication specClass) notNil]) ifTrue:[
+        list := list copyWithFirst:cls.
     ].
     ^ list
 !