Comments (15)
So we've found the reason for these string allocations.. basically the AOT compilation needs to look up the traits of the vector of whatever object type is being referenced here, and it does this by creating the fully qualified name of the type and then doing an internal string-based query in the domain.
We're going to see if there's a different way that we can access the traits here that will avoid the string allocations; as a fallback option though, these strings should be being cached/reused so that they are created at most once for each vector type!
from adobe-runtime-support.
Yes we can look into this one, I've added it to our internal tracker at AIR-256
from adobe-runtime-support.
I'm facing the same issue.
from adobe-runtime-support.
Thanks so much for looking into this, Andrew! It's great to finally know what's happening here โ and caching that String seems like a sound solution to me.
from adobe-runtime-support.
@hardcoremore this is on our current list - we did start looking at it so should have an implementation in there soon..
from adobe-runtime-support.
@ajwfrost Andrew, this is also important one. Is there a hope for this to be fixed?
from adobe-runtime-support.
Awesome,
Thanks so much Andrew.
Regards,
Caslav
from adobe-runtime-support.
Also this is happening for Vectors of non primitive type as well. It does not have to be Dictionary.
from adobe-runtime-support.
Awesome work Andrew!
So that is how much Adobe was lazy, at a minimum they could at least just use one string for each type but they were too lazy to even do that. Anyway this will save a lot of GC collection calls. Thanks again!
from adobe-runtime-support.
Hi @ajwfrost,
Any news about this issue?
Regards,
Caslav
from adobe-runtime-support.
Awesome, thanks @ajwfrost.
from adobe-runtime-support.
@ajwfrost @hardcoremore
Hello, I'm still facing this String allocation issue on iOS. Is there any news? thanks so much!
from adobe-runtime-support.
@jimmymjing this was fixed I think. But I didn't test it. Do you see one string allocation per Vector/Dictionary or multiple?
from adobe-runtime-support.
@hardcoremore I just read through your post on Starling's forum and I also thought it was fixed. but I'm seeing a lot of string allocation with DispatchEventWith() function call in scout.
Here's the screenshot: https://ibb.co/DKzCdWR
from adobe-runtime-support.
Hi all - I just spotted this thread again, thought this had been closed...
So we did update the code so that the original issue is fixed: there will be a string allocation when the first vector type is generated but subsequent accesses should reuse the strings.
It sounds like there are other places where string allocations are happening though. Don't forget that anywhere you create a String object there will be an allocation, so events are quite big culprits for this. Internally the character memory that holds the string is handled fairly efficiently, so e.g. the character memory holding "enterFrame" will be set up once, but then each event that's created will create a new String object that refers to this.
I don't think that's the most efficient thing in the world - even the fact that every frame is sent a newly created enterFrame event seems a bit daft to me. So we can look a bit further into efficiency savings here: please let me know of any particular issues you're seeing where you think that string allocations should be unnecessary!
thanks
from adobe-runtime-support.
Related Issues (20)
- The latest installer requires Rosetta on M1 Macs HOT 4
- All commands can be preceeded by '-licenseFile (path)adt.lic' or '-licenseDevID DevID' to override the use of the lib/adt.lic file HOT 1
- In iOS, the sound of the videos is not coming out.
- Flash CS5.5 camera.requestPermission crash on Androids pixel 2,4 & 6 - (AIR 50.2.3.4 & 50.2.4.4) HOT 2
- package -arch all error HOT 12
- Has Adobe AIR SDK call these APIs default ? Apple has made new regulations on the use of these interfaces. HOT 2
- Does the Adobe Air Sdk can output gcf format which used by Steam๏ผ HOT 2
- [AIR 50.2.2.4.5][iOS] Worker::start() cause crash HOT 1
- gradle build error with 1024bit key HOT 5
- `Unable to identify the distribution that the application is running on.` when trying to package Swivel HOT 2
- [AIR SDK 50.2.4.5][macOS] ADL cannot be launched with some devices HOT 1
- AIR 50.2.4.4 is unstable -Android Vitals is rising HOT 13
- Messy code error occurred in the filename attribute of the application when using Chinese characters
- [Feature Request][macOS] Allow to use `CFBundleDisplayName` with `InfoAdditions` HOT 1
- [Feature Request][macOS] Allow to use `CFBundleSupportedPlatforms` with `InfoAdditions` HOT 1
- iOS Crash: Symbol not found, probably Network.framework HOT 1
- [ISSUE] Directx 11 error on some machines when using Stage3D
- [macOS] `Event.ACTIVATE` dispatched twice for `NativeWindow`
- [macOS] `NativeWindow::resizeToScreen()` resize window only to 1/4 of Retina screen
- `Error: Cannot invoke "macromedia.asc.util.Names.hasNext(int)" because "names" is null` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adobe-runtime-support.