summaryrefslogtreecommitdiff
path: root/swat.obsolete/apps/qooxdoo-examples/test/CanvasLayout_2.html
diff options
context:
space:
mode:
Diffstat (limited to 'swat.obsolete/apps/qooxdoo-examples/test/CanvasLayout_2.html')
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/test/CanvasLayout_2.html139
1 files changed, 139 insertions, 0 deletions
diff --git a/swat.obsolete/apps/qooxdoo-examples/test/CanvasLayout_2.html b/swat.obsolete/apps/qooxdoo-examples/test/CanvasLayout_2.html
new file mode 100644
index 0000000000..19c9a364c1
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/test/CanvasLayout_2.html
@@ -0,0 +1,139 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>qooxdoo &raquo; Demo</title>
+ <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
+ <!--[if IE]>
+ <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
+ <![endif]-->
+ <script type="text/javascript" src="../../script/qx.js"></script>
+</head>
+<body>
+ <script type="text/javascript" src="../../script/layout.js"></script>
+
+ <div id="demoDescription">
+
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var d = qx.ui.core.ClientDocument.getInstance();
+ var w, j;
+
+ for (var i=1; i<=500; i++)
+ {
+ w = new qx.ui.basic.Terminator;
+
+ // unneeded local 'var' statement here costs 0 in all browsers
+
+ // qx.ui.basic.Terminator vs. qx.ui.core.Parent
+ // + 50ms IE
+ // + 140ms(!) MOZ
+
+
+
+
+ // Qooxdoo SET vs. Qooxdoo APPLY
+ // + 300ms IE
+ // + 50ms MOZ
+ /*
+ w.setWidth(1);
+ w.setHeight(1);
+ w.setLeft(20+(1*i));
+ w.setTop(48+(1*i));
+ */
+
+
+ // apply here does not work with new unit handling
+ w.setWidth(1);
+ w.setHeight(1);
+
+ // apply der Dimensionen kostet:
+ // IE: 200ms
+ // MOZ: 150ms
+
+ // 1. davon der modifier: 200ms (IE) (also quasi alles)
+
+ // 1a. davon das Speichern des Typs: 180ms
+ // 1b. davon das Hineinhängen in die Queues: 20ms
+
+ // 1a1. davon das Ermitteln des Typs: 30ms
+ // 1a2. das pure switch kostet 100ms (unglaublich aber wahr)
+ // 1a3. das eigentliche speichern liegt bei rund 10ms (incl Math.round - es waren pixel werte)
+ // 1a4. das Invalidieren von percent/auto switches braucht 20ms
+ // - und der rest von ~20ms hier ist wohl logik overhead
+
+
+
+ // apply here does not work with new unit handling
+ w.setLeft(20+(1*i));
+ w.setTop(48+(1*i));
+
+ // apply der Koordinaten kostet:
+ // IE: 200ms
+ // MOZ: 50ms
+
+
+
+
+
+ // Qooxdoo method for background color vs. style property
+ // + 400ms IE
+ // + 150ms MOZ
+ // w.setBackgroundColor(1+(i/2));
+
+ j = Math.round(i/2).toString();
+ w.setStyleProperty("backgroundColor", "rgb(" + j + "," + j + "," + j + ")");
+
+ // das style property kostet auch schon 200ms im IE und 150ms(!) im MOZ
+ // herrlich
+
+
+
+
+ // das Entfernen der Default-Einträge im qx.ui.core.Widget für
+ // die ID und den zusammengesetzten Classname bringen:
+ // 30ms IE
+ // 0ms MOZ
+
+
+
+
+
+
+ d.add(w);
+
+ // Add:
+ // IE: +140ms
+ // MOZ: +0ms
+
+
+ // das komplexere add (wie aktuell in qx.ui.core.Parent) kostet bei 500 Objekten 20-30ms
+ // mehr (IE) als ein ganz simples setParent, also nicht wirklich nennenswert.
+
+
+
+ // das add im qx.ui.core.ClientDocument (welches hier verwendet wird),
+ // bringt nochmal 20-30ms im IE
+
+
+
+ // das "_modifyParent" kostet 90-100 ms im IE :(
+
+ // 40ms davon für:
+ // this._addToQueues();
+
+ // 10ms davon für
+ // this._addToParentQueue(propValue);
+
+ // das children managment (push/insertAt)
+ // scheint nichts oder sehr wenig zu kosten
+
+ // das in die element queue hängen
+ // verhält sich ähnlich
+ };
+ });
+ </script>
+</body>
+</html> \ No newline at end of file