• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Abnormal memory allocation when doing many calculations on numbers on each frame

Engaged ,
Apr 14, 2018 Apr 14, 2018

Copy link to clipboard

Copied

I have managed to successfully reproduce this issue with minimal code sample. So here is the test project:

http://bit.do/edC3U

Here is the Adobe Scout profile that was recorded for this test project that shows abnormal memory allocation but do not show what is actually allocated:

http://bit.do/edC3U

And here is the screenshot that shows preview of Adobe Scout Profile:

https://ibb.co/gv8p6n

And here is the bug report in Adobe Issue Tracker:

https://tracker.adobe.com/#/view/AIR-4198626

Now I understand that FPS is low because there is a lot to be calculated but why allocating so much memory and plus add overhead of GC runs.

TOPICS
Development

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Apr 14, 2018 Apr 14, 2018

The cause of the abnormal memory  allocation is because I was using !==

When I replace !== with != the memory is not allocated and everything works fine.

Why using !== allocates so much memory?

I understand that using !== should be faster than !=

Further testing shows that this only affects numbers so when using === or !== to compare objects, strings, booleans or ints everything works fine.

Votes

Translate

Translate
Engaged ,
Apr 14, 2018 Apr 14, 2018

Copy link to clipboard

Copied

The cause of the abnormal memory  allocation is because I was using !==

When I replace !== with != the memory is not allocated and everything works fine.

Why using !== allocates so much memory?

I understand that using !== should be faster than !=

Further testing shows that this only affects numbers so when using === or !== to compare objects, strings, booleans or ints everything works fine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 22, 2018 Apr 22, 2018

Copy link to clipboard

Copied

About !==, see discussions like this one:

What does the operator !== mean? - Quora

== checks if two things are the same, even if they are different types. === checks if they are the same, and are the same type. != checks if they are different, regardless of type, and !== checks if they are the same type, but are different. In most cases != would be fine, because you're mainly interested if they are different.

!== presumably uses more memory because it has to check if the two things are of the same type.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 22, 2018 Apr 22, 2018

Copy link to clipboard

Copied

if you take the time to read the ActionScript specification it is all explained there
you can also find bit of explanations in the AS3LCR

I would gladly take 2mn of my time to go and fetch the links
but as the very same individual asking the question
pointed out in another post

First of all, if you are going to assume that I am retarded than there is no point

in writing any response or commenting anything.

I simply followed his advice

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 23, 2018 Apr 23, 2018

Copy link to clipboard

Copied

Colin,

The thing is that this is only happening on Desktop and Android. On iOS using === or !== does not allocates any memory.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 30, 2018 Apr 30, 2018

Copy link to clipboard

Copied

that's because on iOS the code is not executed through the AVM2

the ActionScript ByteCode is first cross-compiled (via LLVM) to generate a native iOS binary

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 01, 2018 May 01, 2018

Copy link to clipboard

Copied

LATEST

Well that explains why performance are so much better on iOS even when tested on similarly equal CPU "performance" when compared to Android and iOS. And also why this bug is happening only on iOS as well Tracker .

I wonder how much performance would Android benefit if they do the same for Android as well. But I assume that will be enormous amount of development and debugging and that it will probably never happen but still.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 16, 2018 Apr 16, 2018

Copy link to clipboard

Copied

You keep asking questions and immediately after post an answer and accept it. This is pointless and ridiculous.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 16, 2018 Apr 16, 2018

Copy link to clipboard

Copied

You are mentally challenged and that is why this seams pointless to you so there is no point in having any discussion with you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 16, 2018 Apr 16, 2018

Copy link to clipboard

Copied

Forum Administrators: Insults should NOT BE ALLOWED on these forums. This user has insulted me (and others) countless of times here and you guys do nothing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 18, 2018 Apr 18, 2018

Copy link to clipboard

Copied

Hi Caslav,

I am Rajashree & have requested for the name change too. Your screen name link immediately still takes us to a blank page.

Moreover, we have moderators who mark the answer correct or helpful. We expect that all of us should respect each other & in case of any feedback, it can be shared in a humble way.

Please maintain the decorum.

Regards

Rajashree

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 19, 2018 Apr 19, 2018

Copy link to clipboard

Copied

I do not understand a word what are you saying. You are blaming me for your faulty software?

First of all I have perfectly valid account. When I click on my name it takes me to my account page just fine.

Hahahaha are you trying to say that only moderators can mark answer helpfull or correct? Then why did you enable me as a user to mark my own question as correct? Why didn’t you disable or remove the button that marks question as correct for me if I am not allowed to do it. What kind of twilight zone of internet this forum is?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 20, 2018 Apr 20, 2018

Copy link to clipboard

Copied

Hi Casalav,

Your post beginning with "You are mentally challenged and that is why this seems pointless to you so there is no point in having any discussion with you." in the forum thread at Abnormal memory allocation when doing many calculations on numbers on each frame  was reported to me as it does not follow our guidelines [https://forums.adobe.com/docs/DOC-7044. It is insulting to others and we cannot tolerate this in the forums. We strive to keep our forums a friendly and inviting place for users to come to ask questions and get help and we need our expert users, especially MVPs, to demonstrate appropriate behaviour for others.

Regards

Rajashree

Forum Admin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 20, 2018 Apr 20, 2018

Copy link to clipboard

Copied

On the question of Correct answer, a lot of times someone will post a question, not getting any suggestions that help, figure it out for themselves, then kindly post back what it was that solved the issue for them. In those cases it's nice that they can mark their own post as being the Correct answer.

The more general case is that someone else is going to give a good answer, and you, the original poster, can mark one of those answers as Correct. The system doesn't imply to you that the answer you mark as correct has to be someone else, and so you can just as easily mark yourself as correct. Maybe the system needs a "mark someone else as correct" option. We moderators could still mark you as correct.

Rajashree can continue about the issues to do with your user name, which seems to have shown up a bug in the forum system.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 22, 2018 Apr 22, 2018

Copy link to clipboard

Copied

I agree it does happen and it could be the case here but the fact that he has done it before makes it a bit suspicious I think, this and the fact that he doesn't like people posting answer in his thread.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines