“View.render()” is a bit slow right after changing a Mesh.
I use some Mesh that have about 10,000 polygon each.
In my case and environment,
“View.render()” takes 200-300ms right after changing.
but later, it takes only 1ms.
Can i avoid this?
“View.render()” is low speed right after changing a Mesh.Software: Away3D 4.x |
||
GoroMatsumoto, Sr. Member
Posted: 22 July 2012 01:41 PM Total Posts: 166 “View.render()” is a bit slow right after changing a Mesh. I use some Mesh that have about 10,000 polygon each. In my case and environment, |
||
GoroMatsumoto, Sr. Member
Posted: 22 July 2012 06:05 PM Total Posts: 166 [ # 1 ] Loading & Parsing models is a heavy process too. So, I wonder if the heavy process in View.render() will work in the Worker too. |
||
|
||
GoroMatsumoto, Sr. Member
Posted: 23 July 2012 03:59 AM Total Posts: 166 [ # 3 ] Hi, Shegl. |
||
Richard Olsson, Administrator
Posted: 23 July 2012 08:09 AM Total Posts: 1192 [ # 4 ] Whether or not this can be solved depends on what those 300 milliseconds really are. Are you sure they happen after everything finishes loading/parsing, because in that case we can rule out parser finalization which can sometimes be quite heavy (especially with heavy geometry.) Basically the only remaining possibility then is that the time is spent uploading assets to the GPU. If you have heavy geometry, and/or textures, it’s reasonable for this to take some time. Your best bet in this case is to try to upload things across several frames, e.g. by not adding them all to the scene at once, or by manually invoking their upload methods (like myTexture.getTextureForStage3D() and SubGeometry.get***Buffer()) across several frames before then adding them all to the scene at the same time. |
||
GoroMatsumoto, Sr. Member
Posted: 23 July 2012 09:33 AM Total Posts: 166 [ # 5 ] Hi, Richard. So, I try manually uploading. |
||
Richard Olsson, Administrator
Posted: 23 July 2012 09:36 AM Total Posts: 1192 [ # 6 ] ASSET_COMPLETE is not the event you should be listening for though. The event that will be dispatched after everything has finished loading is RESOURCE_COMPLETE. The asset events are dispatched once after each asset that finishes loading/parsing (e.g. meshes, materials, geometries, textures et c.) But waiting for 30 seconds should be enough, so your conclusion (and mine) still stands. It’s most probably a GPU upload issue, and there is no way of getting rid of that delay. All you can do is distribute it over several frames as suggested above. |
||
GoroMatsumoto, Sr. Member
Posted: 23 July 2012 10:11 AM Total Posts: 166 [ # 7 ] I didnt know that event.. I should read the doc more. |