Skip to main content
Inspiring
April 14, 2018
Answered

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

  • April 14, 2018
  • 4 replies
  • 1549 views

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.

This topic has been closed for replies.
Correct answer chaky

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.

4 replies

Rajashree Bhattacharya
Community Manager
Community Manager
April 19, 2018

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

chakyAuthor
Inspiring
April 19, 2018

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?

Rajashree Bhattacharya
Community Manager
Community Manager
April 21, 2018

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

chakyAuthor
Inspiring
April 16, 2018

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

Inspiring
April 16, 2018

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.

Inspiring
April 16, 2018

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

chakyAuthorCorrect answer
Inspiring
April 15, 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.

Colin Holgate
Inspiring
April 22, 2018

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.

Inspiring
April 22, 2018

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