-remove unnecessary memory allocation
-use the difference between two numbers instead of toFixed(4)
For tests i take Example_PerformanceTesing sources and replace FastArmature -> Armature
Not optimized flash:
29 armatures 522 bones [Adobe Flash Player 18.0.0.209]
35 armatures 630 bones [Google Chrome Pepper Flash Player 18.0.0.232]
After the optimization:
103 armatures 1854 bones [Adobe Flash Player 18.0.0.209]
180 armatures 3240 bones [Google Chrome Pepper Flash Player 18.0.0.232]
All builds with the same build options (release build, inline = true, optimize bitecode = true)
Update:
made some more optimization:
-remove creation of new Object each time DBOject.calculateParentTransform method called by using pool of objects (see below)
-add new class ParentTransformObject for store the results of the parent transformation (instead of using raw Object)
After the optimization:
113 armatures 2034 bones [Adobe Flash Player 18.0.0.209]
218 armatures 3924 bones [Google Chrome Pepper Flash Player 18.0.0.232]
-remove unnecessary memory allocation -use the difference between two numbers instead of toFixed(4)
For tests i take Example_PerformanceTesing sources and replace FastArmature -> Armature Not optimized flash: 29 armatures 522 bones [Adobe Flash Player 18.0.0.209] 35 armatures 630 bones [Google Chrome Pepper Flash Player 18.0.0.232] After the optimization: 103 armatures 1854 bones [Adobe Flash Player 18.0.0.209] 180 armatures 3240 bones [Google Chrome Pepper Flash Player 18.0.0.232]
All builds with the same build options (release build, inline = true, optimize bitecode = true)
Update: made some more optimization: -remove creation of new Object each time DBOject.calculateParentTransform method called by using pool of objects (see below) -add new class ParentTransformObject for store the results of the parent transformation (instead of using raw Object) After the optimization: 113 armatures 2034 bones [Adobe Flash Player 18.0.0.209] 218 armatures 3924 bones [Google Chrome Pepper Flash Player 18.0.0.232]