ASDReader Performance

Software: Prefab3D

rich, Newbie
Posted: 20 February 2014 04:58 PM   Total Posts: 17

Hello Fabrice and Company,

We are using the asd model format since they load (in comparison) supper fast to other model formats.  Our mobile-ios app currently loads in about 10 seconds on an iPhone 4s and loads many separate asd models.  We have found during profiling that the following 2 methods take up (cumulatively) between 15 - 23% of the time over the entire time to load all models.

private static function readUnsignedShort(ba:ByteArray):Vector.<uint>
private static function readFloats(ba:ByteArray):Vector.

I’m not sure if the time is due to slow iOS/io, etc., so we were wondering if there was a way to speed the implementations up or if there was perhaps someone creating or a native extension that would read in the asd, etc.  This could allow for multi-threading, etc?

Any thoughts? Thanks in advance for any help….Away3d & Prefab rock!

-Richard

   

Avatar
Fabrice Closier, Administrator
Posted: 20 February 2014 05:49 PM   Total Posts: 1265   [ # 1 ]

I’ve claimed the diff for a while now, hence why I advise using as3’s for mobile, its less noticable on desktop where there’s more muscles and ram, tho diff is there too.

The delay is created by the Vector<Type> constructor, horribly long, sometimes over 200 ms for a single instance.

There’s not much I can do on this (as3 parser as is) except to say wait for next update which holds a new version of asd file and parser, slightly faster than current and also having better integration with A4.1.x, cutting down a bit on marschalling exec times for geometries, limiting the need for new vectors.
There are also new things in Prefab added using the new version..
Note that older versions will load back in Prefab as well, allowing you to quickly port older ones to new version if you would want to do it.

I’m not so far of being able to push an update, probably not holding all the goodies I worked on and implemented in there, but at least this new asd version will be available.

Stay tuned

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X