Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing a Dictionary containing Vectors results in String allocations on iOS. #1

Open
PrimaryFeather opened this issue Jun 29, 2017 · 5 comments

Comments

@PrimaryFeather
Copy link
Contributor

@PrimaryFeather PrimaryFeather commented Jun 29, 2017

Problem Description

On iOS (only), assigning a property from a flash.utils.Dictionary, where the property type is a Vector of any non-primitive type, results in at least 3 hidden string allocations, according to Scout.

This was tested with the latest AIR Beta SDK (version 26.0.0 build 112), and several iOS devices using iOS 10.3.2. On Android and Desktop, there are no allocations.

Adobe Tracker Issue: https://tracker.adobe.com/#/view/AIR-4115729

Steps to Reproduce

The class StringAllocationIssue.as constitutes a minimal sample that showcases the problem by accessing a Dictionary once per frame, and StringAllocationIssue.flm shows the analysis of this application on an iPhone 6S. You'll see that once per frame, there are three String allocations; those do not happen on Android or Desktop.

Known Workarounds

When using an Array instead of a Vector, there are no allocations.

@hardcoremore

This comment has been minimized.

Copy link

@hardcoremore hardcoremore commented Oct 8, 2019

@ajwfrost Andrew, this is also important one. Is there a hope for this to be fixed?

@ajwfrost

This comment has been minimized.

Copy link
Collaborator

@ajwfrost ajwfrost commented Oct 8, 2019

Yes we can look into this one, I've added it to our internal tracker at AIR-256

@hardcoremore

This comment has been minimized.

Copy link

@hardcoremore hardcoremore commented Oct 8, 2019

Awesome,

Thanks so much Andrew.

Regards,

Caslav

@hardcoremore

This comment has been minimized.

Copy link

@hardcoremore hardcoremore commented Oct 8, 2019

Also this is happening for Vectors of non primitive type as well. It does not have to be Dictionary.

@jimmymjing

This comment has been minimized.

Copy link

@jimmymjing jimmymjing commented Nov 12, 2019

I'm facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.