slow grow operation on array removed
authorca
Fri, 18 Jul 1997 07:24:05 +0200
changeset 221 319a24a1df06
parent 220 8f0065e7a83d
child 222 dd2688307d90
slow grow operation on array removed
UILayoutTool.st
--- a/UILayoutTool.st	Thu Jul 17 18:46:03 1997 +0200
+++ b/UILayoutTool.st	Fri Jul 18 07:24:05 1997 +0200
@@ -14,7 +14,7 @@
 
 
 ApplicationModel subclass:#UILayoutTool
-	instanceVariableNames:'modifiedHolder aspects selection layoutView'
+	instanceVariableNames:'modifiedHolder aspects selection layoutView tabList'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-UIPainter'
@@ -431,12 +431,8 @@
         self class slices findFirst:[:e|
             e last == type ifTrue:[name := e first. true]
         ].
-        type == #Extent ifTrue:[
-            list := Array with:name
-        ] ifFalse:[
-            list := self class slices collect:[:e| e first ].
-            list removeLast.
-        ].
+        type ~~ #Extent ifTrue:[ list := tabList ]
+                       ifFalse:[ list := Array with:name ].
     ].
     self noteBookList  value:list.
     self noteBookModel value:name.
@@ -619,6 +615,8 @@
 initialize
     "initialize channels
     "
+    |slices size|
+
     super initialize.
 
     aspects  := IdentityDictionary new.
@@ -636,7 +634,11 @@
         aspects at:aKey put:holder.
     ].
 
+    slices  := self class slices.
+    size    := slices size - 1.
+    tabList := Array new:size.
 
+    1 to:size do:[:i| tabList at:i put:((slices at:i) first) ].
 
 
 ! !