]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix pane performance regression and add a unit test to catch it
authorslava <slava@factorcode.org>
Fri, 29 Sep 2006 19:59:06 +0000 (19:59 +0000)
committerslava <slava@factorcode.org>
Fri, 29 Sep 2006 19:59:06 +0000 (19:59 +0000)
TODO.FACTOR.txt
library/ui/gadgets/panes.factor
library/ui/load.factor
library/ui/test/panes.factor [new file with mode: 0644]

index 1eaa8cf92d1cfc14ef310ff091a46dbf0e996b86..96dc9e5e8290a1ac4ccc07922fb2de34d1935d48 100644 (file)
@@ -1,6 +1,23 @@
+- auto-invoke code gc
+- cocoa: support real redefinition
+- fix this:
+  [ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 ] .
+[ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 
+]
+- prettier printing of hashtable literals, alists, cond, ...
+- the editor should fill up the interior of the scroller completely
+- hide empty command groups in $commands
+- ui quick start doc
+- page scrolling should be timer-based too
+- x11: scroll up/down wiggles caret
+- slider needs to be modelized
+- mouse over for input w/ multiple lines looks stupid
+- more compact relocation info
+- hashed generic method dispatch
+
 + ui:
 
-- the editor should fill up the interior of the scroller completely
+- some way of intercepting all gestures
 - pane output in UI should use less memory
 - variable width word wrap
   - needs layout tricks
 - ui browser: show currently selected vocab & words
   - keyboard-navigatable list gadget of some kind
 - tuple= in dataflow view
-- hide empty command groups in $commands
-- ui quick start doc
 - auto-update browser and help when sources reload
 - how do we refer to command shortcuts in the docs?
 - figure out if we need both set-model and set-model*
-- if i do 10000 [ . ] each and then clear, the listener window is slow
 - full-height nodes should really be full height
 - better help result ranking
-- page scrolling should be timer-based too
-- x11: scroll up/down wiggles caret
 - roundoff is still not quite right with tracks
 - fix top level window positioning
 - x11.app has a problem with A+ keys
@@ -38,7 +50,6 @@
   - more efficient multi-line inserts
   - write "foo| " and put caret at | then select word element: selects
     space
-- slider needs to be modelized
 - fonts/ should go inside the .app -- we need multi-tier resource-path
 - should be possible to drop an image file on the .app to run it
 - support x11's large selections, if needed
@@ -53,7 +64,6 @@
   - horizontal wheel scrolling
   - polish OS X menu bar code
 - structure editor
-- mouse over for input w/ multiple lines looks stupid
 
 + module system:
 
@@ -70,7 +80,6 @@
 
 + compiler/ffi:
 
-- more compact relocation info
 - problem if major gc happens during relocation
   - in fact relocation should not cons at all
 - stdcall callbacks
 - signal 4 on datastack underflow on mac intel??
 - fix alien-callback/SEH bug on win32
 - minor GC takes too long now, we should card mark code heap
-- fix this:
-  [ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 ] .
-[ 1 2 3 4 5 6 7 8 9 10 10 10 10 10 10 10 10 10 10 11 11 11 113 
-]
-- prettier printing of hashtable literals, alists, cond, ...
 - buffer-ptr should be an alien
 - swap nappend ==> nappend
 - sometimes darcs get fails with the httpd
 - incremental GC
 - UDP
 - slice: if sequence or seq start is changed, abstraction violation
-- hashed generic method dispatch
 
 + httpd:
 
index 408efa1cde6d0c672a5aba2df39d33edc96175a6..651fee3d1520685b414fef7597d5faeffb6ba82a 100644 (file)
@@ -64,7 +64,7 @@ M: pane stream-flush drop ;
     dup pane-scrolls? [ scroll>bottom ] [ drop ] if ;
 
 M: pane stream-terpri
-    dup pane-current prepare-print
+    dup pane-current dup unparent prepare-print
     over pane-output add-incremental
     dup prepare-line
     scroll-pane ;
index 5b5232fc997d8408488ce3f12ba8a9f89005498e..26de58cffc75cdb89a27d414e6cdd410471dd8c6 100644 (file)
@@ -52,4 +52,5 @@ PROVIDE: library/ui {
     "test/rectangles.factor"
     "test/fields.factor"
     "test/commands.factor"
+    "test/panes.factor"
 } ;
diff --git a/library/ui/test/panes.factor b/library/ui/test/panes.factor
new file mode 100644 (file)
index 0000000..2ebdb58
--- /dev/null
@@ -0,0 +1,18 @@
+IN: temporary
+USING: gadgets-panes gadgets freetype namespaces kernel
+sequences io test prettyprint ;
+
+: maybe-with-freetype
+    freetype get [ call ] [ with-freetype ] if ; inline
+
+: #children "pane" get gadget-children length ;
+
+[
+    <pane> "pane" set
+
+    #children "num-children" set
+    
+    "pane" get [ 10000 [ . ] each ] with-stream*
+    
+    [ t ] [ #children "num-children" get = ] unit-test
+] maybe-with-freetype