[ https://issues.apache.org/jira/browse/FLEX-33865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812343#comment-13812343 ]
Benoit Wiart edited comment on FLEX-33865 at 11/3/13 11:51 AM: --------------------------------------------------------------- Micro Benchmark (On desktop no profiler) nr = 10000 for (var i:Number = 0; i < nr; i++) { result = LayoutElementHelper.parseConstraintExp(HERE THE VALUE); } NOTE that it's the worst case as this benchmark does not re-use the array It won't be the case in ConstraintLayout#parseElementConstraints LayoutElementHelper.parseConstraintExp("col1:10"); Before (avg) : 64ms After (avg) : 9ms LayoutElementHelper.parseConstraintExp("100"); Before (avg) : 37ms After (avg) : 5ms LayoutElementHelper.parseConstraintExp(100); Before (avg) : 4ms After (avg) : 6ms LayoutElementHelper.parseConstraintExp(null); Before (avg) : 4ms After (avg) : 6ms if needed we can change the LayoutElementHelper#parseConstraintExp and force the caller to provide an array (and remove the added ifs) was (Author: benoitw): Micro Benchmark (On desktop) nr = 10000 for (var i:Number = 0; i < nr; i++) { result = LayoutElementHelper.parseConstraintExp(HERE THE VALUE); } NOTE that it's the worst case as this benchmark does not re-use the array It won't be the case in ConstraintLayout#parseElementConstraints LayoutElementHelper.parseConstraintExp("col1:10"); Before (avg) : 64ms After (avg) : 9ms LayoutElementHelper.parseConstraintExp("100"); Before (avg) : 37ms After (avg) : 5ms LayoutElementHelper.parseConstraintExp(100); Before (avg) : 4ms After (avg) : 6ms LayoutElementHelper.parseConstraintExp(null); Before (avg) : 4ms After (avg) : 6ms if needed we can change the LayoutElementHelper#parseConstraintExp and force the caller to provide an array (and remove the added ifs) > ConstraintLayout / LayoutElementHelper are memory inefficient (and slow) > ------------------------------------------------------------------------ > > Key: FLEX-33865 > URL: https://issues.apache.org/jira/browse/FLEX-33865 > Project: Apache Flex > Issue Type: Improvement > Components: Mobile: Performance, Spark: Layout > Affects Versions: Apache Flex 4.11.0 > Environment: mobile desktop > Reporter: Benoit Wiart > Assignee: Maurice Amsellem > Labels: mobile, performance > Attachments: 0001-ConstraintLayout-optimizations.patch, > layout-1-desktop-memory.png, layout-2-desktop-memory.png > > > ConstraintLayout / LayoutElementHelper are doing too many memory allocation. > it's really bad on mobile > the attached screenshots were taken on desktop -- This message was sent by Atlassian JIRA (v6.1#6144)