r20514: implement idl for DsGetNT4ChangeLog() which transferres the meta data
[bbaumbach/samba-autobuild/.git] / webapps / qooxdoo-0.6.3-sdk / frontend / demo / source / html / performance / LocalObject_3.html
1 <html>
2 <head>
3   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4   <title>qooxdoo &raquo; Demo</title>
5   <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
6   <!--[if IE]>
7   <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
8   <![endif]-->
9   <script type="text/javascript" src="../../script/qx.js"></script>
10 </head>
11 <body>
12   <script type="text/javascript" src="../../script/layout.js"></script>
13
14   <div id="demoDescription">
15     <p>JS Object Storage Performance</p>
16
17     <h1>Test Description</h1>
18     <p>Precreate 50.000 objects (locally stored). After this create 10.000 new (not stored) objects inside a loop.</p>
19
20     <h1>Result</h1>
21     <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>
22     <p>It makes no difference if we use a global or a local variable here. It's identical to GlobalObject_3.html.</p>
23   </div>
24
25   <script type="text/javascript">
26   qx.core.Init.getInstance().defineMain(function()
27   {
28     var store = [];
29
30     for (var i=0; i<50000; i++) {
31       store.push({});
32     };
33
34     function test()
35     {
36       var _s = (new Date).valueOf();
37
38       for (var i=0; i<10000; i++) {
39         new Object()
40       };
41
42       window.status = "time: " + (new Date).valueOf() + " | measured: " + ((new Date).valueOf() - _s) + "ms";
43       window.setTimeout(test, 1000);
44     }
45
46     test();
47
48     qx.lang.Array.removeAll(store);
49   });
50   </script>
51 </body>
52 </html>