[
https://issues.apache.org/jira/browse/FLEX-33865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812675#comment-13812675
]
Maurice Amsellem commented on FLEX-33865:
-----------------------------------------
Justin,
I re-did your tests to confirm that I get the same results:
- LayoutElementHelper from 9% to 0%
- GC from 5% to 3%.
then I did another test removing the "temp" Array from the calls in
ConstraintLayout so that Array creation is forced.
Results:
- LayoutElementHelper => still 0%
- GC: 4%
So the code optimization (indexOf ) code saves 10% and the Array recycling 1%.
PS: I didn't use any constraints, so as you said it's the replacement of
split+replace by indexOf to detect that we're in number case that causes the
major improvement.
I will commit the patch now.
> 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-optimizationsV2.patch,
> desktopafter.png, desktopbefore.png, layout-1-desktop-memory.png,
> layout-2-desktop-memory.png, layout-3-mobile-memory.png,
> layout_performance.patch
>
>
> 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)