Highlighted

AIR Win 64 bit captive much slower than AIR Win 32 bit captive

Engaged ,
Jul 17, 2018

Copy link to clipboard

Copied

Hi,

It seams that there is a "big" performance difference between AIR Win 32 bit and AIR Win 64 apps at least in this test.

For Win 32 bit captive time is around 17 seconds and for Win 64 bit captive time is around 50 second. That is a big difference

Why would this test be so much slower when I compile for Win 64 bit captive than Win 32 bit captive:

package

{

    import flash.display.Sprite;

    import flash.display.StageAlign;

    import flash.display.StageScaleMode;

    import flash.events.Event;

    import flash.text.TextField;

    import flash.text.TextFormat;

    import flash.utils.getTimer;

    import flash.utils.setTimeout;

   

    [SWF(frameRate="60", width="1280", height="720", backgroundColor="0x000000")]

    public class PerformanceTestAIR extends Sprite

    {

        private static var i:int = 0;

        private static var c:int = 0;

        private static var m:int = 0;

        private static var f:int = 0;

       

        private var _logTextField:TextField;

       

        public function PerformanceTestAIR()

        {

            stage.align = StageAlign.TOP_LEFT;

            stage.scaleMode = StageScaleMode.NO_SCALE;

           

            this.loaderInfo.addEventListener(Event.COMPLETE, this.loaderInfoLoadCompleteEventHandler);

        }

       

        protected function loaderInfoLoadCompleteEventHandler(event:Event):void

        {

            _logTextField = new TextField();

            _logTextField.text = 'Test Text';

            _logTextField.defaultTextFormat = new TextFormat('Consolas', 30, 0xFFFFFF);

           

            addChild(_logTextField);

           

            setTimeout(runTest, 1000);   

        }

       

        private function runTest():void

        {

            var time:int = getTimer();

           

            for(i = 0; i <= 500000000; i++)

            {

                f += incrementC();

                f += incrementM();

            }

           

            _logTextField.text = (getTimer() - time).toString();

        }

       

        private function incrementC():int

        {

            if(isModule2(c) == 1)

            {

                c += 1;

            }

            else

            {

                c += 2;

            }

           

            return c;

        }

       

        private function incrementM():int

        {

            if(isModule2(m) == 1)

            {

                m += 1;

            }

            else

            {

                m += 2;

            }

           

            return m;

        }

       

        private function isModule2(v:int):int

        {

            if(v % 2 == 0)

            {

                return 1;

            }

            else

            {

                return 0;

            }

        }

    }

}

TOPICS
Development

Views

304

Likes

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

AIR Win 64 bit captive much slower than AIR Win 32 bit captive

Engaged ,
Jul 17, 2018

Copy link to clipboard

Copied

Hi,

It seams that there is a "big" performance difference between AIR Win 32 bit and AIR Win 64 apps at least in this test.

For Win 32 bit captive time is around 17 seconds and for Win 64 bit captive time is around 50 second. That is a big difference

Why would this test be so much slower when I compile for Win 64 bit captive than Win 32 bit captive:

package

{

    import flash.display.Sprite;

    import flash.display.StageAlign;

    import flash.display.StageScaleMode;

    import flash.events.Event;

    import flash.text.TextField;

    import flash.text.TextFormat;

    import flash.utils.getTimer;

    import flash.utils.setTimeout;

   

    [SWF(frameRate="60", width="1280", height="720", backgroundColor="0x000000")]

    public class PerformanceTestAIR extends Sprite

    {

        private static var i:int = 0;

        private static var c:int = 0;

        private static var m:int = 0;

        private static var f:int = 0;

       

        private var _logTextField:TextField;

       

        public function PerformanceTestAIR()

        {

            stage.align = StageAlign.TOP_LEFT;

            stage.scaleMode = StageScaleMode.NO_SCALE;

           

            this.loaderInfo.addEventListener(Event.COMPLETE, this.loaderInfoLoadCompleteEventHandler);

        }

       

        protected function loaderInfoLoadCompleteEventHandler(event:Event):void

        {

            _logTextField = new TextField();

            _logTextField.text = 'Test Text';

            _logTextField.defaultTextFormat = new TextFormat('Consolas', 30, 0xFFFFFF);

           

            addChild(_logTextField);

           

            setTimeout(runTest, 1000);   

        }

       

        private function runTest():void

        {

            var time:int = getTimer();

           

            for(i = 0; i <= 500000000; i++)

            {

                f += incrementC();

                f += incrementM();

            }

           

            _logTextField.text = (getTimer() - time).toString();

        }

       

        private function incrementC():int

        {

            if(isModule2(c) == 1)

            {

                c += 1;

            }

            else

            {

                c += 2;

            }

           

            return c;

        }

       

        private function incrementM():int

        {

            if(isModule2(m) == 1)

            {

                m += 1;

            }

            else

            {

                m += 2;

            }

           

            return m;

        }

       

        private function isModule2(v:int):int

        {

            if(v % 2 == 0)

            {

                return 1;

            }

            else

            {

                return 0;

            }

        }

    }

}

TOPICS
Development

Views

305

Likes

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
Jul 17, 2018 0
Enthusiast ,
Jul 17, 2018

Copy link to clipboard

Copied

if other dev can not replicate your test and environment for the test

there is not much to say

could be anything from "you moved the mouse while doing some test"
to "oh yeah there is an actual bug"

so ... maybe provide OS versions number, SDK versions, and command-line compile commands

so it can be replicated and verified by others

Likes

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
Reply
Loading...
Jul 17, 2018 0
Engaged ,
Jul 18, 2018

Copy link to clipboard

Copied

I am using latest Windows 10, AIR SDK 30 and Flash Builder 4.7 to compile. I am not using method inlining.

Likes

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
Reply
Loading...
Jul 18, 2018 0
Enthusiast ,
Jul 18, 2018

Copy link to clipboard

Copied

"latest" does not mean much and can be interpreted differently

is it the latest beta download? the latest release?

the tests HAVE TO be automated (somehow) so people can replicate them

and, the hardware spec, the OS versions, and the compiler/runtime versions used

are ALL very important

see for example

https://jacksondunstan.com/articles/2431

see avmplus/test

avmplus/test at master · adobe/avmplus · GitHub

avmplus/test/performance at master · adobe/avmplus · GitHub


also see Apache Flex SDK

flex-sdk/mustella at master · apache/flex-sdk · GitHub

Mustella Overview - Apache Flex - Apache Software Foundation

Likes

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
Reply
Loading...
Jul 18, 2018 0
chaky LATEST
Engaged ,
Jul 18, 2018

Copy link to clipboard

Copied

This is the exact version of Windows OS on my machine:

https://ibb.co/dwr9ry

I am using AIR SDK 30.0.0.107 release version.

Also, I have Intel Core i7-4771 processor with 16GB of RAM installed.

Likes

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
Reply
Loading...
Jul 18, 2018 0