summaryrefslogtreecommitdiff
path: root/swat.obsolete/apps/qooxdoo-examples/performance
diff options
context:
space:
mode:
Diffstat (limited to 'swat.obsolete/apps/qooxdoo-examples/performance')
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_1.html57
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_2.html47
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_1.html43
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_2.html51
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_3.html53
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_4.html52
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_1.html43
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_2.html51
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_3.html52
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_4.html53
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_5.html50
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/NumberCreate_1.html110
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_1.html57
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_2.html77
-rwxr-xr-xswat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_1.html92
-rwxr-xr-xswat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_2.html88
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_3.html97
-rwxr-xr-xswat.obsolete/apps/qooxdoo-examples/performance/ObjectSize_1.html62
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/Qooxdoo_1.html83
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_1.html95
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_2.html98
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_3.html109
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/TypeCheck_1.html84
-rw-r--r--swat.obsolete/apps/qooxdoo-examples/performance/index.html18
24 files changed, 1622 insertions, 0 deletions
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_1.html
new file mode 100644
index 0000000000..0fe1f5fe72
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_1.html
@@ -0,0 +1,57 @@
+<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">
+ <p>Tests for empty Array creation performance</p>
+ <ol>
+ <li>Using "[]"</li>
+ <li>Using "new Array"</li>
+ <li>Using "new Array()"</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function ArrayCreate1(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = [];
+ };
+ };
+
+ function ArrayCreate2(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Array;
+ };
+ };
+
+ function ArrayCreate3(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Array();
+ };
+ };
+
+ new qx.dev.TimeTracker(ArrayCreate1, ArrayCreate2, ArrayCreate3);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_2.html b/swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_2.html
new file mode 100644
index 0000000000..fcc0a05a73
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ArrayCreate_2.html
@@ -0,0 +1,47 @@
+<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">
+ <p>Tests for filled Array creation performance</p>
+ <ol>
+ <li>Using "[ values ]"</li>
+ <li>Using "new Array(values)"</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function ArrayCreate1(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = [ 1, 2, 3, 4, 5 ];
+ };
+ };
+
+ function ArrayCreate2(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Array(1, 2, 3, 4, 5);
+ };
+ };
+
+ new qx.dev.TimeTracker(ArrayCreate1, ArrayCreate2);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_1.html
new file mode 100644
index 0000000000..006745ad12
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_1.html
@@ -0,0 +1,43 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Create 10.000 new (non stored) objects inside a loop. Identical to LocalObject_1.html.</p>
+
+ <h1>Result</h1>
+ <p>The performance in IE is quite good (~330ms for each loop), compared to the same stuff executed without the precreated stuff.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_2.html b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_2.html
new file mode 100644
index 0000000000..e6d2e2f9a9
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_2.html
@@ -0,0 +1,51 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Precreate 50.000 objects (globally stored). After this create 10.000 new (non stored) objects inside a loop.</p>
+ <p>Keep global storage over runtime.</p>
+
+ <h1>Result</h1>
+ <p>The performance in IE is poor (~1150ms for each loop), compared to the same stuff executed without so much precreated objects (previous example).</p>
+ <p>It makes no difference if we use a global or a local variable here. It's identical to LocalObject_2.html.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ window.store = [];
+
+ for (var i=0; i<50000; i++) {
+ window.store.push({});
+ };
+
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_3.html b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_3.html
new file mode 100644
index 0000000000..7d8f9490f7
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_3.html
@@ -0,0 +1,53 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Precreate 50.000 objects (globally stored). After this create 10.000 new (non stored) objects inside a loop.</p>
+ <p>Use removeAll to clean up global storage after first loop.</p>
+
+ <h1>Result</h1>
+ <p>The additional cleanup (remove all entries) of the global storage optimizes performance after the first loop. First loop is done after ~1150ms. The following loop needs ~490ms. Not bad, but poorly compared to the version, where the storage have never exist before. (See first examples, which executes in ~350ms.)</p>
+ <p>It makes no difference if we use a global or a local variable here. It's identical to LocalObject_3.html.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ window.store = [];
+
+ for (var i=0; i<50000; i++) {
+ window.store.push({});
+ };
+
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+
+ qx.lang.Array.removeAll(window.store);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_4.html b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_4.html
new file mode 100644
index 0000000000..57220fc846
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/GlobalObject_4.html
@@ -0,0 +1,52 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Precreate 50.000 objects (globally stored). After this create 10.000 new (non stored) objects inside a loop.</p>
+ <p>Overwrite global storage to clean up after first loop.</p>
+
+ <h1>Result</h1>
+ <p>The additional cleanup (overwrite with null) of the global storage optimizes performance after the first loop. First loop is done after ~1150ms. The following loop needs ~350ms. Quite good. The same value as in the first example, where the data have never exist.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ window.store = [];
+
+ for (var i=0; i<50000; i++) {
+ window.store.push({});
+ };
+
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+
+ window.store = null;
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_1.html
new file mode 100644
index 0000000000..bca9610f11
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_1.html
@@ -0,0 +1,43 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Create 10.000 new (non stored) objects inside a loop. Identical to GlobalObject_1.html.</p>
+
+ <h1>Result</h1>
+ <p>The performance in IE is quite good (~330ms for each loop), compared to the same stuff executed without the precreated stuff.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_2.html b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_2.html
new file mode 100644
index 0000000000..7a98805f2c
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_2.html
@@ -0,0 +1,51 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Precreate 50.000 objects (locally stored). After this create 10.000 new (not stored) objects inside a loop.</p>
+ <p>As the loop will be executed inside the scope of "store", the browser must keep the information about "store" with each execution of "test", even if called from the timeout.</p>
+
+ <h1>Result</h1>
+ <p>The performance in IE is poor (~1150ms for each loop), compared to the same stuff executed without so much precreated objects (previous example).</p>
+ <p>It makes no difference if we use a global or a local variable here. It's identical to GlobalObject_2.html.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var store = [];
+
+ for (var i=0; i<50000; i++) {
+ store.push({});
+ };
+
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_3.html b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_3.html
new file mode 100644
index 0000000000..ab55099694
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_3.html
@@ -0,0 +1,52 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Precreate 50.000 objects (locally stored). After this create 10.000 new (not stored) objects inside a loop.</p>
+
+ <h1>Result</h1>
+ <p>The additional cleanup (remove all entries) of the local storage optimizes performance after the first loop. First loop is done after ~1150ms. The following loop needs ~490ms. Not bad, but poorly compared to the version, where the storage have never exist before. (See first examples, which executes in ~350ms.)</p>
+ <p>It makes no difference if we use a global or a local variable here. It's identical to GlobalObject_3.html.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var store = [];
+
+ for (var i=0; i<50000; i++) {
+ store.push({});
+ };
+
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+
+ qx.lang.Array.removeAll(store);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_4.html b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_4.html
new file mode 100644
index 0000000000..d633458e9c
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_4.html
@@ -0,0 +1,53 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Precreate 50.000 objects (locally stored). After this create 10.000 new (not stored) objects inside a loop.</p>
+ <p>The "store" variable will be resetted after the first loop with "null".</p>
+
+ <h1>Result</h1>
+ <p>The additional cleanup (overwrite with null) of the global storage optimizes performance after the first loop. First loop is done after ~1150ms. The following loop needs ~350ms. Quite good. The same value as in the first example, where the data have never exist.</p>
+ <p>Interesting because theoratically the function implemenetation of "test" is inside the scope of "store".</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var store = [];
+
+ for (var i=0; i<50000; i++) {
+ store.push({});
+ };
+
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ test();
+
+ store = null;
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_5.html b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_5.html
new file mode 100644
index 0000000000..34f351c688
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/LocalObject_5.html
@@ -0,0 +1,50 @@
+<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">
+ <p>JS Object Storage Performance</p>
+
+ <h1>Test Description</h1>
+ <p>Precreate 50.000 objects (locally stored). After this create 10.000 new (not stored) objects inside a loop.</p>
+ <p>The test method is implemented outside of the scope of "store".</p>
+
+ <h1>Result</h1>
+ <p>We need no additional cleanup to get a good performance of the function. First loop is done after ~1150ms. The following loop needs ~350ms. Quite good. The same value as in the first example, where the data have never exist.</p>
+ </div>
+
+ <script type="text/javascript">
+ function test()
+ {
+ var _s = (new Date).valueOf();
+
+ for (var i=0; i<10000; i++) {
+ new Object()
+ };
+
+ window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
+ window.setTimeout(test, 1000);
+ }
+
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var store = [];
+
+ for (var i=0; i<50000; i++) {
+ store.push({});
+ };
+
+ test();
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/NumberCreate_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/NumberCreate_1.html
new file mode 100644
index 0000000000..7cdb760b62
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/NumberCreate_1.html
@@ -0,0 +1,110 @@
+<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">
+ <p>Tests for Number creation performance</p>
+ <ol>
+ <li>Using simple number</li>
+ <li>Using parseInt</li>
+ <li>Using parseFloat</li>
+ <li>Using new with string int</li>
+ <li>Using new with string float</li>
+ <li>Using new with simple number</li>
+ <li>Using new with parseInt</li>
+ <li>Using new with parseFloat</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var n1 = "2392";
+ var n2 = "223.92";
+
+ function NumberCreate1(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = 2392;
+ };
+ };
+
+ function NumberCreate2(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = parseInt(n1);
+ };
+ };
+
+ function NumberCreate3(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = parseFloat(n2);
+ };
+ };
+
+ function NumberCreate4(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Number(n1);
+ };
+ };
+
+ function NumberCreate5(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Number(n2);
+ };
+ };
+
+ function NumberCreate6(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Number(2392);
+ };
+ };
+
+ function NumberCreate7(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Number(parseInt(n1));
+ };
+ };
+
+ function NumberCreate8(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Number(parseFloat(n2));
+ };
+ };
+
+ new qx.dev.TimeTracker(NumberCreate1, NumberCreate2, NumberCreate3, NumberCreate4, NumberCreate5, NumberCreate6, NumberCreate7, NumberCreate8);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_1.html
new file mode 100644
index 0000000000..d1b0c69971
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_1.html
@@ -0,0 +1,57 @@
+<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">
+ <p>Tests for empty Object creation performance</p>
+ <ol>
+ <li>Using "{}"</li>
+ <li>Using "new Object"</li>
+ <li>Using "new Object()"</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function ObjectCreate1(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = {};
+ };
+ };
+
+ function ObjectCreate2(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Object;
+ };
+ };
+
+ function ObjectCreate3(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = new Object();
+ };
+ };
+
+ new qx.dev.TimeTracker(ObjectCreate1, ObjectCreate2, ObjectCreate3);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_2.html b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_2.html
new file mode 100644
index 0000000000..8a5128e234
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectCreate_2.html
@@ -0,0 +1,77 @@
+<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">
+ <p>Tests for filled Object creation performance</p>
+ <ol>
+ <li>Using "{ content }"</li>
+ <li>Using "new Object; obj.key = value"</li>
+ <li>Using "new Object(); obj.key = value"</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function ObjectCreate1(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++) {
+ foo = {
+ key1 : 1,
+ key2 : 2,
+ key3 : 3,
+ key4 : 4,
+ key5 : 5
+ };
+ };
+ };
+
+ function ObjectCreate2(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++)
+ {
+ foo = new Object;
+
+ foo.key1 = 1;
+ foo.key2 = 2;
+ foo.key3 = 3;
+ foo.key4 = 4;
+ foo.key5 = 5;
+ };
+ };
+
+ function ObjectCreate3(vLoops)
+ {
+ var foo;
+
+ for (var i=0; i<vLoops; i++)
+ {
+ foo = new Object();
+
+ foo.key1 = 1;
+ foo.key2 = 2;
+ foo.key3 = 3;
+ foo.key4 = 4;
+ foo.key5 = 5;
+ };
+ };
+
+ new qx.dev.TimeTracker(ObjectCreate1, ObjectCreate2, ObjectCreate3);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_1.html
new file mode 100755
index 0000000000..23106c50dc
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_1.html
@@ -0,0 +1,92 @@
+<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">
+ <p>Testing the influence of inheritance to object creation performance.</p>
+ <p>Result: Each inheritance level increases the negative effect.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function l1() {
+ this.store = true;
+ }
+
+ function l2() {
+ l1.call(this);
+ }
+ l2.prototype = new l1;
+
+ function l3() {
+ l2.call(this);
+ }
+ l3.prototype = new l2;
+
+ function l4() {
+ l3.call(this);
+ }
+ l4.prototype = new l3;
+
+ function l5() {
+ l4.call(this);
+ }
+ l5.prototype = new l4;
+
+ function l6() {
+ l5.call(this);
+ }
+ l6.prototype = new l5;
+
+
+ function t1(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l1;
+ }
+ }
+
+ function t2(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l2;
+ }
+ }
+
+ function t3(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l3;
+ }
+ }
+
+ function t4(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l4;
+ }
+ }
+
+ function t5(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l5;
+ }
+ }
+
+ function t6(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l6;
+ }
+ }
+
+ new qx.dev.TimeTracker(t1, t2, t3, t4, t5, t6);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_2.html b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_2.html
new file mode 100755
index 0000000000..64aaf7c644
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_2.html
@@ -0,0 +1,88 @@
+<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">
+ <p>Testing the influence of inheritance to object creation performance.</p>
+ <p>Don't execute superclass constructor.</p>
+ <p>Result: No negative effect!</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function l1() {
+ this.store = true;
+ }
+
+ function l2() {
+ }
+ l2.prototype = new l1;
+
+ function l3() {
+ }
+ l3.prototype = new l2;
+
+ function l4() {
+ }
+ l4.prototype = new l3;
+
+ function l5() {
+ }
+ l5.prototype = new l4;
+
+ function l6() {
+ }
+ l6.prototype = new l5;
+
+
+ function t1(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l1;
+ }
+ }
+
+ function t2(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l2;
+ }
+ }
+
+ function t3(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l3;
+ }
+ }
+
+ function t4(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l4;
+ }
+ }
+
+ function t5(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l5;
+ }
+ }
+
+ function t6(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l6;
+ }
+ }
+
+ new qx.dev.TimeTracker(t1, t2, t3, t4, t5, t6);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_3.html b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_3.html
new file mode 100644
index 0000000000..f69a14d099
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectLevel_3.html
@@ -0,0 +1,97 @@
+<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">
+ <p>Testing the influence of inheritance to object creation performance.</p>
+ <p>Result: Each inheritance level increases the negative effect.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function l1() {
+ this.store = true;
+ }
+
+ function l2() {
+ this._t = l1;
+ this._t();
+ }
+ l2.prototype = new l1;
+
+ function l3() {
+ this._t = l2;
+ this._t();
+ }
+ l3.prototype = new l2;
+
+ function l4() {
+ this._t = l3;
+ this._t();
+ }
+ l4.prototype = new l3;
+
+ function l5() {
+ this._t = l4;
+ this._t();
+ }
+ l5.prototype = new l4;
+
+ function l6() {
+ this._t = l5;
+ this._t();
+ }
+ l6.prototype = new l5;
+
+
+ function t1(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l1;
+ }
+ }
+
+ function t2(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l2;
+ }
+ }
+
+ function t3(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l3;
+ }
+ }
+
+ function t4(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l4;
+ }
+ }
+
+ function t5(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l5;
+ }
+ }
+
+ function t6(vLoops) {
+ for (var i=0; i<vLoops; i++) {
+ new l6;
+ }
+ }
+
+ new qx.dev.TimeTracker(t1, t2, t3, t4, t5, t6);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/ObjectSize_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectSize_1.html
new file mode 100755
index 0000000000..c80c05e976
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/ObjectSize_1.html
@@ -0,0 +1,62 @@
+<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">
+ <p>Testing the incluence to the performance of data using the prototype mechanism on classes.</p>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var emptyObject = function() {};
+ var protoObject1 = function() {};
+ var protoObject2 = function() {};
+
+ for (var i=0; i<1000; i++)
+ {
+ protoObject1.prototype["i" + i] = function() {
+ alert("Hello World: " + i);
+ };
+ }
+
+ for (var i=0; i<1000; i++)
+ {
+ protoObject2.prototype["i" + i] = "Hello World";
+ }
+
+ function empty(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new emptyObject;
+ }
+ }
+
+ function protos1(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new protoObject1;
+ }
+ }
+
+ function protos2(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new protoObject2;
+ }
+ }
+
+ new qx.dev.TimeTracker(empty, protos1, protos2);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/Qooxdoo_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/Qooxdoo_1.html
new file mode 100644
index 0000000000..bad5574641
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/Qooxdoo_1.html
@@ -0,0 +1,83 @@
+<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">
+ <p>Tests for qooxdoo object performance</p>
+ <ol>
+ <li>qx.core.Object</li>
+ <li>qx.core.Target</li>
+ <li>qx.event.type.Event</li>
+ <li>qx.event.type.MouseEvent</li>
+ <li>qx.ui.basic.Terminator</li>
+ <li>qx.ui.layout.CanvasLayout</li>
+ <li>qx.ui.layout.BoxLayout</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function TestObject(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new qx.core.Object;
+ };
+ };
+
+ function TestTarget(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new qx.core.Target;
+ };
+ };
+
+ function TestEvent(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new qx.event.type.Event;
+ };
+ };
+
+ function TestMouseEvent(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new qx.event.type.MouseEvent;
+ };
+ };
+
+ function TestTerminator(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new qx.ui.basic.Terminator;
+ };
+ };
+
+ function TestCanvasLayout(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new qx.ui.layout.CanvasLayout;
+ };
+ };
+
+ function TestBoxLayout(vLoops)
+ {
+ for (var i=0; i<vLoops; i++) {
+ new qx.ui.layout.BoxLayout;
+ };
+ };
+
+ new qx.dev.TimeTracker(TestObject, TestTarget, TestEvent, TestMouseEvent, TestTerminator, TestCanvasLayout, TestBoxLayout);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_1.html
new file mode 100644
index 0000000000..f0d1ec901d
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_1.html
@@ -0,0 +1,95 @@
+<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">
+ <p>Tests for String Performance. Using new String instances for concat.</p>
+ <ol>
+ <li>Operator +=</li>
+ <li>Operators = and +</li>
+ <li>Concat function</li>
+ <li>Array Push</li>
+ <li>Array Index</li>
+ <li>StringBuilder Object</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ function StringConcatShort(vLoops)
+ {
+ var s = "";
+
+ for (var i=0; i<vLoops; i++) {
+ s += "a";
+ };
+ };
+
+ function StringConcatShortAlt(vLoops)
+ {
+ var s = "";
+
+ for (var i=0; i<vLoops; i++) {
+ s = s + "a";
+ };
+ };
+
+ function StringConcatMethod(vLoops)
+ {
+ var s = "";
+
+ for (var i=0; i<vLoops; i++) {
+ s=s.concat("a");
+ };
+ };
+
+ function StringConcatArrayPush(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s.push("a");
+ };
+
+ s = s.join("");
+ };
+
+ function StringConcatArrayAdd(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s[s.length] = "a";
+ };
+
+ s = s.join("");
+ };
+
+ function StringConcatStringBuilder(vLoops)
+ {
+ var s = new qx.type.StringBuilder;
+
+ for (var i=0; i<vLoops; i++) {
+ s.add("a");
+ };
+
+ s = s.get();
+ };
+
+ new qx.dev.TimeTracker(StringConcatShort, StringConcatShortAlt,
+ StringConcatMethod, StringConcatArrayPush, StringConcatArrayAdd,
+ StringConcatStringBuilder);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_2.html b/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_2.html
new file mode 100644
index 0000000000..d2b2c140c5
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_2.html
@@ -0,0 +1,98 @@
+<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">
+ <p>Tests for String Performance. Using cached string instances for concat.</p>
+ <ol>
+ <li>Operator +=</li>
+ <li>Operators = and +</li>
+ <li>Concat function</li>
+ <li>Array Push</li>
+ <li>Array Index</li>
+ <li>StringBuilder Object</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var e = "";
+ var a = "a";
+
+ function StringConcatShort(vLoops)
+ {
+ var s = e;
+
+ for (var i=0; i<vLoops; i++) {
+ s += a;
+ };
+ };
+
+ function StringConcatShortAlt(vLoops)
+ {
+ var s = e;
+
+ for (var i=0; i<vLoops; i++) {
+ s = s + a;
+ };
+ };
+
+ function StringConcatMethod(vLoops)
+ {
+ var s = e;
+
+ for (var i=0; i<vLoops; i++) {
+ s=s.concat(a);
+ };
+ };
+
+ function StringConcatArrayPush(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s.push(a);
+ };
+
+ s = s.join(e);
+ };
+
+ function StringConcatArrayAdd(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s[s.length] = a;
+ };
+
+ s = s.join(e);
+ };
+
+ function StringConcatStringBuilder(vLoops)
+ {
+ var s = new qx.type.StringBuilder;
+
+ for (var i=0; i<vLoops; i++) {
+ s.add(a);
+ };
+
+ s = s.get();
+ };
+
+ new qx.dev.TimeTracker(StringConcatShort, StringConcatShortAlt,
+ StringConcatMethod, StringConcatArrayPush, StringConcatArrayAdd,
+ StringConcatStringBuilder);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_3.html b/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_3.html
new file mode 100644
index 0000000000..2169b81b21
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/StringConcat_3.html
@@ -0,0 +1,109 @@
+<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">
+ <p>Tests for String Performance.</p>
+ <p>Getting an filled array of strings and try to combine them.</p>
+
+ <ol>
+ <li>Operator +=</li>
+ <li>Operators = and +</li>
+ <li>Concat function</li>
+ <li>Array Push</li>
+ <li>Array Index</li>
+ <li>Array Append</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var e = "";
+ var a = "a";
+
+ function getStringArr(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s.push(a);
+ };
+
+ return s;
+ };
+
+ function StringConcatShort(vLoops)
+ {
+ var s = e;
+
+ for (var i=0; i<vLoops; i++) {
+ s += getStringArr(vLoops).join(e);
+ };
+ };
+
+ function StringConcatShortAlt(vLoops)
+ {
+ var s = e;
+
+ for (var i=0; i<vLoops; i++) {
+ s = s + getStringArr(vLoops).join(e);
+ };
+ };
+
+ function StringConcatMethod(vLoops)
+ {
+ var s = e;
+
+ for (var i=0; i<vLoops; i++) {
+ s=s.concat(getStringArr(vLoops).join(e));
+ };
+ };
+
+ function StringConcatArrayPush(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s.push(getStringArr(vLoops).join(e));
+ };
+
+ s = s.join(e);
+ };
+
+ function StringConcatArrayAdd(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s[s.length] = getStringArr(vLoops).join(e);
+ };
+
+ s = s.join(e);
+ };
+
+ function StringConcatArrayAppend(vLoops)
+ {
+ var s = [];
+
+ for (var i=0; i<vLoops; i++) {
+ s.push.apply(s, getStringArr(vLoops));
+ };
+
+ s = s.join(e);
+ };
+
+ new qx.dev.TimeTracker(StringConcatShort, StringConcatShortAlt, StringConcatMethod, StringConcatArrayPush, StringConcatArrayAdd, StringConcatArrayAppend);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/TypeCheck_1.html b/swat.obsolete/apps/qooxdoo-examples/performance/TypeCheck_1.html
new file mode 100644
index 0000000000..7ef0f0db13
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/TypeCheck_1.html
@@ -0,0 +1,84 @@
+<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">
+ <p>Tests for typical value checks and their performance.</p>
+ <ol>
+ <li>Typeof with Strings</li>
+ <li>Typeof with Constants</li>
+ <li>Instanceof</li>
+ </ol>
+ </div>
+
+ <script type="text/javascript">
+ qx.core.Init.getInstance().defineMain(function()
+ {
+ var STR = "string";
+ var NR = "number";
+ var OBJ = "object";
+
+ var str = "Hello World"
+ var nr1 = 1000;
+ var nr2 = Infinity;
+ var nr3 = NaN;
+ var nr4 = 0.432;
+ var obj1 = {};
+ var obj2 = { key1 : "hello world", key2 : "hello world", key3 : "hello world" }
+
+ function typeCheckTypeof1(vLoops)
+ {
+ for (var i=0; i<vLoops; i++)
+ {
+ typeof str === "string";
+ typeof nr1 === "number";
+ typeof nr2 === "number";
+ typeof nr3 === "number";
+ typeof nr4 === "number";
+ typeof obj1 === "object";
+ typeof obj2 === "object";
+ }
+ }
+
+ function typeCheckTypeof2(vLoops)
+ {
+ for (var i=0; i<vLoops; i++)
+ {
+ typeof str === STR;
+ typeof nr1 === NR;
+ typeof nr2 === NR;
+ typeof nr3 === NR;
+ typeof nr4 === NR;
+ typeof obj1 === OBJ;
+ typeof obj2 === OBJ;
+ }
+ }
+
+ function typeCheckInstanceOf(vLoops)
+ {
+ for (var i=0; i<vLoops; i++)
+ {
+ str instanceof String
+ nr1 instanceof Number
+ nr2 instanceof Number
+ nr3 instanceof Number
+ nr4 instanceof Number
+ obj1 instanceof Object
+ obj2 instanceof Object
+ }
+ }
+
+ new qx.dev.TimeTracker(typeCheckTypeof1, typeCheckTypeof2, typeCheckInstanceOf);
+ });
+ </script>
+</body>
+</html>
diff --git a/swat.obsolete/apps/qooxdoo-examples/performance/index.html b/swat.obsolete/apps/qooxdoo-examples/performance/index.html
new file mode 100644
index 0000000000..ac437542ac
--- /dev/null
+++ b/swat.obsolete/apps/qooxdoo-examples/performance/index.html
@@ -0,0 +1,18 @@
+<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">
+ <p>Please choose an example from above.</p>
+ </div>
+</body>
+</html> \ No newline at end of file