kottore / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

[Away3DLite] Collada script parsing timeouts on bone animated models #70

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Export a large bone animated model (my example is 4500 faces/2600 verts)
2. Import with away3dlite

What is the expected output? What do you see instead?

I expected a model of this size to parse quickly enough to avoid triggering
a player timeout.

I am seeing:
Error #1502: A script has executed for longer than the default timeout
period of 15 seconds.

What version of the product are you using? On what operating system?

URL: http://away3d.googlecode.com/svn/trunk/fp10/Away3DLite/src/away3dlite
Revision: 1945

Please provide any additional information below.

As it turns out, the error is getting triggered in
BonesAnimator.as:addSkinController()

There is an On^2 search across the vertices each time the method is
invoked, and this list can become large. I was able to eliminate this error
in my case (and significantly reduce the overall parse time) by removing
this search and replacing the skin vertices list with a dictionary lookup.

In order to prevent the switch to a dictionary from degrading runtime
performance, I also added a method to dump the collected values back into a
Vector for fast iteration in update(). 

I have attached a patch against r1945 to illustrate.

Original issue reported on code.google.com by ken.rai...@gmail.com on 13 Oct 2009 at 11:30

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by katopz on 10 Dec 2009 at 8:45