r25048: From the archives (patch found in one of my old working trees):
[jelmer/samba4-debian.git] / webapps / qooxdoo-0.6.5-sdk / frontend / application / sample / source / html / performance / ObjectLevel_2.html
1 <html>
2 <head>
3   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4   <title>qooxdoo &raquo; Demo &raquo; Sample</title>
5   <link type="text/css" rel="stylesheet" href="../../css/layout.css"/>
6   <!--[if IE]>
7   <link type="text/css" rel="stylesheet" href="../../css/layout_ie.css"/>
8   <![endif]-->
9   <script type="text/javascript" src="../../script/sample.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>Don't execute superclass constructor.</p>
17     <p>Result: No negative effect!</p>
18   </div>
19
20   <script type="text/javascript">
21   qx.core.Init.getInstance().defineMain(function()
22   {
23     function l1() {
24       this.store = true;
25     }
26
27     function l2() {
28     }
29     l2.prototype = new l1;
30
31     function l3() {
32     }
33     l3.prototype = new l2;
34
35     function l4() {
36     }
37     l4.prototype = new l3;
38
39     function l5() {
40     }
41     l5.prototype = new l4;
42
43     function l6() {
44     }
45     l6.prototype = new l5;
46
47
48     function t1(vLoops) {
49       for (var i=0; i<vLoops; i++) {
50         new l1;
51       }
52     }
53
54     function t2(vLoops) {
55       for (var i=0; i<vLoops; i++) {
56         new l2;
57       }
58     }
59
60     function t3(vLoops) {
61       for (var i=0; i<vLoops; i++) {
62         new l3;
63       }
64     }
65
66     function t4(vLoops) {
67       for (var i=0; i<vLoops; i++) {
68         new l4;
69       }
70     }
71
72     function t5(vLoops) {
73       for (var i=0; i<vLoops; i++) {
74         new l5;
75       }
76     }
77
78     function t6(vLoops) {
79       for (var i=0; i<vLoops; i++) {
80         new l6;
81       }
82     }
83
84     new qx.dev.TimeTracker(t1, t2, t3, t4, t5, t6);
85   });
86   </script>
87 </body>
88 </html>