ono keiji | 7 May 2009 09:45
Picon

v4.3.0 create instance is slow than v3.3.3

I did the instance create test on v3.3.3 and v4.3.0.
Surprisingly v4.3.0 was slow than v3.3.3.
Why dose it?

[Test Case]
By using the attachment and take their mean time [msec].

[Result]
On Windows FireFox v3.0
      v.3.3.3  v4.3.0
swf8  733     4,103
swf9   -        910
swf10  -        893

On Windows IE7
      v.3.3.3  v4.3.0
swf8  488     3,257
swf9   -        571
swf10  -        698

Ono Keiji
ono@...
<?xml version="1.0" encoding="UTF-8"?>
<canvas debug="true">
	<script>
		var t1 = new Date();
		var st = t1.getTime();
	</script>

	<class name="myLabel">
		<attribute name="label" type="string"/>
		<attribute name="labelx"/>
		<attribute name="labely"/>
		
		<text text="${classroot.label}" x="${classroot.labelx}" y="${classroot.labely}"/>
		<edittext width="200" x="50" y="${classroot.labely}"/>
	</class>
	
	<class name="Win" extends="window" x="250" y="0" width="300" height="250" title="Win">
		<myLabel name="label1" label="${this.name}" labelx="10" labely="20"/>
		<myLabel name="label2" label="${this.name}" labelx="10" labely="50"/>
		<myLabel name="label3" label="${this.name}" labelx="10" labely="80"/>
		<myLabel name="label4" label="${this.name}" labelx="10" labely="110"/>
		<myLabel name="label5" label="${this.name}" labelx="10" labely="140"/>
	</class>

	<handler name="oninit">
		<![CDATA[
		for( var i=0; i<10; i++){
			var w = new lz.Win();
		}
		
		var t2 = new Date();
		var et = t2.getTime();
		var dt = et - st;
		Debug.write( "init time[ms]: ", dt );
		]]>
	</handler>
</canvas>	

Gmane