[
https://issues.apache.org/jira/browse/FLEX-33865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812535#comment-13812535
]
Benoit Wiart commented on FLEX-33865:
-------------------------------------
[~mamsellem]
>Consider I am dumb, and explain to me why
>return [ X, Y ] requires more allocation than result = new Array() ; result[0]
>= X; result[1] = Y; return result;
Because in the parseElementConstraints the array will be re-used == no memory
allocation.
This patch saves a lot of memory allocation, doesn't regress the speed and
correct a bug (trim)
I'm ready to improve the patch, but if memory improvements are not welcomed
(and I understand that : flex team might have other priorities) then tell me.
Anyway thanks for your time on this issue.
> 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,
> layout-1-desktop-memory.png, layout-2-desktop-memory.png,
> layout-3-mobile-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)