CPU/memory usage of AIR application under Mac 10.4.10

As my AIR application uses a lot of CPU/memory under Mac
(seems better in Windows), I decide to do some basic testing. I
create several applications with different level of complexities.
Below is a table of CPU/memory usage when the application is simply
sitting there. A brief description of the application can be found
in the end of each line.
Here are some results:
[1] Even for an empty application, CPU usage is not zero
(most non-AIR application has 0 CPU usage when doing nothing). Also
the memory usage is huge, comparable to Finder on my computer.
[2] Empty application has 7 threads running.
[3] Indetermined progress bar costs a lot of CPU; and I guess
any other animation costs a lot of CPU too. But if they are
invisible they are fine.
[4] running timer costs CPU.
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE
VSIZE application
10093 adl 1.8% 0:01.85 7 100 292 15.0M 13.8M+ 22.8M 444M
empty
10094 adl 1.9% 0:01.55 7 100 299 15.2M 14.0M+ 23.1M 444M
label
10097 adl 1.9% 0:01.48 7 100 302 15.3M 13.4M 23.7M 445M
progress bar
10095 adl 5.7% 0:02.40 7 100 302 15.4M- 13.2M 23.5M 445M
progress bar (indetermined)
10125 adl 15.9% 0:03.66 7 100 304 15.7M- 13.4M 23.9M 445M 5
progress bar (indetermined)
10126 adl 29.7% 0:10.39 7 100 325 16.7M+ 13.4M+ 24.9M+ 445M
10 progress bar (indetermined)
10128 adl 1.9% 0:01.34 7 100 324 16.1M 13.7M 24.3M 445M 10
progress bar (indetermined), visible=false
10136 adl 1.8% 0:00.76 7 100 323 16.5M+ 13.9M+ 24.7M- 450M
Empty datagrid
10147 adl 1.9% 0:01.60 7 101 328 16.1M 13.8M+ 24.5M- 447M
TabNavigator with two empty VBox children
10138 adl 1.8% 0:01.59 7 100 372 19.4M 13.9M 27.7M 453M
datagrid with 10000 simple rows
10131 adl 3.1% 0:02.38 7 110 348 25.7M 19.3M 34.8M 458M 10
Empty native windows
10143 adl 1.9% 0:00.99 7 100 296 15.1M 13.9M+ 23.2M- 444M
Timer, delay = 100ms, calling an empty function
10145 adl 4.1% 0:02.35 7 100 298 15.0M 14.0M+ 23.2M- 444M
Timer, delay = 100ms, calling function update label position
As to my own application, it's much bigger than these simple
ones. The CPU usually stablizes to 20% and VSIZE is about 1G. There
is no timer running. When I leave the application open for a few
hours, the application will eventually freeze and I have to kill
it.
I am wondering if there are any articles or documents
explaining AIR's CPU/memory usage. And also if AIR is planning to
improve the performance in the next release.

James, thank you for the very fast answer! I did various tests on the weekend on my computer and computer of my friend.
And I can say, that Debug flag doesn't affect memory consumption.   They still eat memory. My steps to reproduce are as follows:
(Windows 7 32 bit)
Photoshop CS5:
1) set HKEY_CURRENT_USER\Software\Adobe\CSXS2Preferences\PlayerDebugMode to 0
2*) check HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\CSXS2Preferences (just in case)
3) Compile HelloPhotoshop example to ZXP and install via  Extension manager
4) restart computer
5) Run Photoshop CS5 - Memory consumption: 100 096 KB
6) Open HelloPhotoshop and close it 10 times
7) Memory consumption: 155 840 - 5,574 MB per one close/open
Maybe a garbage collector is expected to run and free this memory, but it never happened in my case. The memory pool was increasing to 1 GB when I was working with one of my panels - with no documents open in Photoshop
In InDesign I tried the same thing with HelloInDesign ( I had to close the panel completely and then open with Window | Extensions | HelloInDesign)
Memory consumption on start: 118 516
Memory consumption after 10 open/close cycles: 197 516
It's 7,9 MB per one close/open
It's the simpliest panel test. When I'm using AIR libraries the memory usage is increasing a lot faster.

Similar Messages

  • CPU/Memory Usage increases when loading SWF files in AIR.

    Hi,
    We face the below mentioned problem. Would be great if someone could help us.
    Due to problems with uploading the attachment here, please send a email to the following email-id ([email protected]) and I shall send the attachment in response.
    CPU/Memory usage increases drastically while moving the SWC components and loading the SWF Files.
    "Problem Description" - On executing the sample application, a window with multiple objects is shown. The loaded SWC components in flex consume too much Memory and CPU cycles. This is visible in TaskManager. On dragging one of the object, CPU  / memory usage increases drastically.
    "Steps to Reproduce" -
    Draggable window is placed at the bottom in the sample application with Text indication.
    Drag the indicated window.
    "Actual Result" - System's CPU usage increasing drastically  around 50% to 60 %.
    "Expected Result" - Drastical increase in memory\CPU should not occur.
    "Any Workarounds" - No"
    Thanks in advance.

    You can control your external swf from your main.swf in the following method:
    loadswf(clips[0]);
    function loadswf(tmp:String):void{
        passedString=tmp;
        ldr= new Loader();
        ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
        ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
        ldr.load(new URLRequest(animPath+tmp));
        function progressListener (e:ProgressEvent):void{
            ploader.visible=true;
        function swfLoaded(e:Event):void {
            mcExt = e.target.content as MovieClip;
            ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
            mcExt.addEventListener(Event.ENTER_FRAME,onEnterfn);
            ploader.visible=false;
            addChild(mcExt);
    function onEnterfn(e:Event):void{
        var num:int=mcExt.currentFrame;
        switch(passedString){
            case clips[0]:
                if (num==1) mcExt.play();
                if (num==9) {
                   mcExt.skipmc.addEventListener(MouseEvent.CLICK,skipfn);
                    function skipfn(e:MouseEvent):void{
                        mcExt.stop();
                       mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                        gotoAndStop("help");
                if (num==mcExt.totalFrames){
                   mcExt.removeEventListener(Event.ENTER_FRAME,onEnterfn);
                    gotoAndStop("help");
                break;

  • How to capture memory usage for web application

    In OATS openscripts, how to capture memory usage for web application? Does it have the exisitng java method that we can call to get the memory data (e.g. peak bytes, private bytes) consumed by web application?

    JProbe

  • Is it possible to packaging Air application for Mac AppStore with Air 3?

    Is it possible to packaging Air application for Mac AppStore with Air 3 ?

    Anyone from adobe? Anyone?
    Also I was wondering what could prevent the window from going
    away when user uses windows "show desktop" command, or perhaps
    there is a way to restore it right away?
    thanks.

  • CPU Memory usage

    CPU memory usage is keep increasing whenever, I have opened a package from SQL developer. I am using the latest version (4.0.0.13.80) of sql developer. How to resolve this.?

    Hi,
    If you use Oracle 10g v.2 you can take a look and recomendations about memory tuning using AWR (Analytic Workload Repository). Of course , theoretically , you can take a look on Oracle doc titled 'Oracle Performance Tuning '.
    Sorry , i didn't know that your database is 9i. However , if you open Enterprise Manager Console on Memory Section you can find the memory statistics of your database and some pieces of advice , as well.....
    Simon
    Message was edited by:
    sgalaxy

  • Extensive (very very very extensive) memory usage of host application with CS extension

    Hi!
    I tried this only under Photoshop CS5 and InDesign CS5 under Windows 7.
    When you open and close CS extension panel, the memory taken by Photoshop (InDesign) increases by 6-30MB!
    In case of the simple HelloPhotoshop (HelloInDesign) panel from the examples, compiled in release mode, when you open it and close, - it's about 6-10MB each time you do it. And in case of a more complex panel, which uses AIR, etc. it's about 30MB per one panel close/open.
    When I use some panels in 5-10 minutes Photoshop (InDesign) increases its memory pool from 600MB up to 1,2 GB. And more. And this memory is never freed, only until Photoshop (InDesign) shutdown.
    I tried freeing all my arrays, killing display objects, etc. - nothing helped. Even a simple HelloPhotoshop (HelloInDesign) that does nothing eats memory.
    By the way, InDesign eats memory a lot faster .

    James, thank you for the very fast answer! I did various tests on the weekend on my computer and computer of my friend.
    And I can say, that Debug flag doesn't affect memory consumption.   They still eat memory. My steps to reproduce are as follows:
    (Windows 7 32 bit)
    Photoshop CS5:
    1) set HKEY_CURRENT_USER\Software\Adobe\CSXS2Preferences\PlayerDebugMode to 0
    2*) check HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\CSXS2Preferences (just in case)
    3) Compile HelloPhotoshop example to ZXP and install via  Extension manager
    4) restart computer
    5) Run Photoshop CS5 - Memory consumption: 100 096 KB
    6) Open HelloPhotoshop and close it 10 times
    7) Memory consumption: 155 840 - 5,574 MB per one close/open
    Maybe a garbage collector is expected to run and free this memory, but it never happened in my case. The memory pool was increasing to 1 GB when I was working with one of my panels - with no documents open in Photoshop
    In InDesign I tried the same thing with HelloInDesign ( I had to close the panel completely and then open with Window | Extensions | HelloInDesign)
    Memory consumption on start: 118 516
    Memory consumption after 10 open/close cycles: 197 516
    It's 7,9 MB per one close/open
    It's the simpliest panel test. When I'm using AIR libraries the memory usage is increasing a lot faster.

  • CPU & Memory usage is more..

    Dear Friends,
    i have developed my ticker with alert option using Flash and
    AIR. it is running fine! As a ticker it has to run contineusly,
    when it runs contineouly mymemory usage and cpu usage is keep on
    getting increased and the memory usage size also more. pls give me
    the suggestion how to reduce it. becoz, this ticker has to run
    contineously, in one stage it may hang the system it seems...
    pls be informed that, previously i used timer, to reduce
    memory problem and cpu usage, removed timer and i inserted a
    moviclip running for 1 sec, end of movieclip i triggered the
    event... then also the same memory usage iam getting..
    pls give me some solution for this....
    Regards,
    Syed Abdul Rahim

    I recently published a blog post which might help you.
    http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/
    Also check out the references at the bottom.
    Hope this helps.

  • Memory Leakage in AIR application

    Hi all,
        I have a performance issue with air application. After launching the application if we keep the application idle means also the memory is creeping up.Why is it so? . How to solve this.
    Thanks & Regards,
    Jayagopal.

    one main cause for memory lekage problem is unclosed database connection.
    so please check any unclosed database connection if any....

  • Upgrading to FF 27 created huge (~1 GB/hr) memory usage for iconified windows on Mac 10.8

    Here is what I know about the problem:
    - Two different Macs (10.8.x, 10.9.x) with 32 GB RAM ran out of system swap due to the size of the Firefox process growing to over 20 GB, and both machines had virtually idle CPUs with no Firefox usage whatsoever - they were unattended
    - It occurred immediately after upgrading from Firefox 26 to 27.0.1
    - The set of pages, tabs, windows was the same before and after upgrading
    - There does not seem to be a single identifiable URL that causes the problem, but opening a window with this URL and then iconifying it causes memory to be leaked at a substantial rate (at least on one OS X 10.8.5 machine)
    - http://msdn.microsoft.com/en-us/magazine/cc163744.aspx
    - I normally have ~25 tabs distributed across ~8 windows, all of which but one are iconified
    - Memory is consumed at the staggering rate of ~1 GB/hour while the offensive window is iconified
    - Memory is not leaked per-se - about:memory confirms that heap-unclassified memory is growing rapidly, but as soon as the offending window is opened and no longer iconified, the memory usage immediately drops back to the normal ~1 GB or so - this is also verifiable in Activity Monitor.app, etc
    - The problem occurs in safe mode, but regardless the only plugins installed are Shockwave Flash, QuickTime, and Java Applet
    - I have killed Firefox repeatedly and can recreate the same memory usage pattern
    - I have at least one Mac, however, on which trying to reproduce this does nothing
    - I've already spent hours trying to determine even the initial cause of this

    Another user was talking about this issue on the forum and created a bug report.
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=973776 Bug 973776 - Memory leak in Firefox 27.0.1 ]
    You can create another bug report or add your details into this report.

  • How to measure Java CPU & memory usage

    Hi,
    I'm not sure whether this is the right forum to post this message.
    I have a java application and basically it takes lots of CPU time and memory. What my concern right now is the CPU usage. Basically I reduced the number of CPUs from 8 to 4 (Solaris v1280 box) and the CPU usage got increased from 30% to 90% :(
    My requirement: Is there anyway that I can measure the CPU usage using Java code itself, so that I can insert those "set of APIs" (for measuring CPU usage), between APIs to collect the CPU usage data?
    Thanks,
    Siva

    Take a look at this.
    http://articles.techrepublic.com.com/5100-10878_11-6067049.html

  • Uncontrolled Memory usage in webcenter application.

    I have a webcenter application which I use as Consumer Application. This application contains 30 Portlets registered using portlet producers.
    All these portlets are again webcenter applications portletized using the Portlet Faces Bridge.
    I deploy this consumer application on one of the OC4J containers in application server.
    Also, the 30 producers are deployed in another OC4J Container in the same application server.
    When I start accessing my consumer application and the page containing any portlet, the heap size of that container starts increasing till it reaches maximum level and then finally hangs up. Also, this heap size does not come down and I am not able to fulfill any further requests.
    The container and application logs suggest java.lang.OutOfMemory Error . Heap Space.
    Also, the heap size of producer containers is under control. I am not able to understand how to control / release this heap memory.
    When I run a minimized version of this consumer application ( having 5 - 10 portlet producers registered) It works pretty fine.
    So I think when the number of portlet producer registrations increase, there is this memory leak.
    Is there a limit to the number of portlet producers that can be registered in a webcenter consumer application? How can I find out where exactly is the memory leak? How do I bring down the heap size once processing is finished?

    Hi vsharma2,
    Thanks a lot for your reply.
    we have tried all the things mentioned by you. We have also increased the physical memory to the extent we could.
    But my main concern is that the memory does not get released. We cannot increase memory to very high levels. It has to stop somewhere.
    If we could get a solution whereby we understand how to release the memory consumed by the portlet producers once they have been used, it could solve the problem. Unfortunately, we haven't got any solution in this direction. Also, we have done code optimization, closed everything (whatever we can) in finally block and increased the container Heap size also.
    Hope we get something to release the memory consumed by portlets or portlet producers.
    Anyway, thanks a lot for your directions.
    Regards,
    Kunal

  • What is available free memory in skeleton air application?

    hi,
    My pc has 12 gb.
    I was developing full scale DESKTOP adobe air app and it started to crash on mousemove. So basically i wanted to see whats available free memory  it was showing 50mb
    that was too low for my app to process data.
    So i went back and created simple HTML that shows available free memory...it shows 80mb free....whats going on?.
    Anyone care to explain? FREE memory should be atleast 50% of allocated memory of processs assuming system uses 50%
    Here is code and here is HTML
    output
    Memory-f-88-t-6452-p-30064
    HTML
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>PUSH PERFECT</title>   
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="assets/js/frameworks/libs/air/AIRAliases.js"></script>
    </head>
    <body  style="overflow:hidden;padding:5px;" id="MySplitter" >                   
                        <div class="span5 grider"  style="text-align:left;">
                                <ul class="breadcrumb">
                                <li><a href="#">Calculation</a> <span class="divider"> </span></li>
                                <li><span >Memory</span>-f-<span id='freememory'></span>-t-<span id='totalmemory'></span>-p-<span id='privatememory'></span></li>
                                </ul>
                        </div>
    <script>
    function displaymemory()
    var totalmemory=air.System.    totalMemoryNumber;
    var freememory=air.System.freeMemory;
    var privatememory=air.System.privateMemory;
    document.getElementById("totalmemory").innerHTML=totalmemory/1024;
    document.getElementById("freememory").innerHTML=freememory/1024;
    document.getElementById("privatememory").innerHTML=privatememory/1024;
    displaymemory();
    air.System.gc();
    displaymemory();
    </script>
    </body>
    </html>
    ===================
    Thanks in advance

    Hot Cpu Tester can test every device in the pc .
    Use it alot myself , assisting others with PC's and at work if there is problematic machines .
    Given it thumbs -up in the past and in the present time .  
    http://7byte.com/index.php?page=hotcpu

  • Multi-Touch AIR application in Mac?

    Hi, can someone tell me if the multi touch functions work on the Mac? I've read some postings about the multi-touch not working in the browsers on mac but will a stand-alone app run? I haven't seen any recent post with examples? Thank you!

    This is exactly the same problem I am having. I'm trying to
    load a local xml file from the same directory as the application
    (using OS 10.4.11).
    I am trying it this way:
    var xmlLoader:URLLoader = new URLLoader();
    var file:File = flash.filesystem.File.applicationDirectory;
    file = file.resolvePath("my.xml");
    var xmlPath:URLRequest = new URLRequest(file.url);
    try {
    xmlLoader.load(xmlPath);
    } catch (error:Error) {
    trace("Unable to load requested document.");
    Works perfectly on Windows but I get the #2032 error on Mac.
    Has someone done this successfully with Air (and how)? ;-)

  • Problem with signing AIR application on Mac

    I have a Code Signing key from Comodo as a P7s file which has been imported into Keychain Access on my Mac.
    Keychain Access lets me export the key to a P12 file but does not give me the option to export the key with the entire chain intact.
    I can successfully identify the exported key but then when I try to export a release build I get the error:
    Error creating AIR file: Unable to build a valid certificate chain for the signer.
    Any suggestions on how to overcome this issue?
    TIA
    David Anson

    I think someone in the AIR forums will have a higher probability of knowing how to do this using Keychain:
    http://forums.adobe.com/community/air
    Thanks,
    Anirudh

  • Impossible to debug AIR Application on Mac OS X Maverick. After several seconds AIR App freezes and Mac OS console displays : adl caught causing excessive wakeups. Can you help on that issue ?

    After launching my app in debug mode, app starts correctly, and after few seconds, apps completely freezes, there is no possibility to pause it, and Mac OS console gives such message :
    06/08/2014 17:27:58,000 kernel[0]: process adl[2941] caught causing excessive wakeups. Observed wakeups rate (per sec): 1278; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45028
    Note that on another mac, i don't have that issue, with the same application.

    After a lot of searches, at least i have an indication. When i set -debug=false, i don't have the issue anymore. But of course, i can't debug my file, so it is not of a great help, but maybe this will lead to an idea to you all..
    Note that Apple support was indicating me that by creating a new user account on my Mac i could have solved it. I tried, and it seems to work for few hours. But after the problem came back again with my new account.
    Of course still looking for a solution , it is very very annoying.

Maybe you are looking for