r21325: delete children in reverse order since the array is manipulated during the...
[samba.git] / webapps / qooxdoo-0.6.3-sdk / frontend / demo / source / html / performance / ObjectLevel_1.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>Testing the influence of inheritance to object creation performance.</p>
16     <p>Result: Each inheritance level increases the negative effect.</p>
17   </div>
18
19   <script type="text/javascript">
20   qx.core.Init.getInstance().defineMain(function()
21   {
22     function l1() {
23       this.store = true;
24     }
25
26     function l2() {
27       l1.call(this);
28     }
29     l2.prototype = new l1;
30
31     function l3() {
32       l2.call(this);
33     }
34     l3.prototype = new l2;
35
36     function l4() {
37       l3.call(this);
38     }
39     l4.prototype = new l3;
40
41     function l5() {
42       l4.call(this);
43     }
44     l5.prototype = new l4;
45
46     function l6() {
47       l5.call(this);
48     }
49     l6.prototype = new l5;
50
51
52     function t1(vLoops) {
53       for (var i=0; i<vLoops; i++) {
54         new l1;
55       }
56     }
57
58     function t2(vLoops) {
59       for (var i=0; i<vLoops; i++) {
60         new l2;
61       }
62     }
63
64     function t3(vLoops) {
65       for (var i=0; i<vLoops; i++) {
66         new l3;
67       }
68     }
69
70     function t4(vLoops) {
71       for (var i=0; i<vLoops; i++) {
72         new l4;
73       }
74     }
75
76     function t5(vLoops) {
77       for (var i=0; i<vLoops; i++) {
78         new l5;
79       }
80     }
81
82     function t6(vLoops) {
83       for (var i=0; i<vLoops; i++) {
84         new l6;
85       }
86     }
87
88     new qx.dev.TimeTracker(t1, t2, t3, t4, t5, t6);
89   });
90   </script>
91 </body>
92 </html>