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;

Similar Messages

  • Load SWF file from AIR library module.

    Hi,
    I am writing a testing agent (record and playback agent) for Flex applications.
    Here, I am required to load a SWF object (in a new window) from a AIR module library.
    And then I need a handle to the newly opened SWF so that I can perform testing operations on it.
    How can I accomplish this. Any links or sample code is welcome.
    Thanks,
    Pradeep.

    10.0.1 is very old, we're on 11.2 now.  Do you know about when this started breaking for you?  I'd suggest two things.  First, you might want to post over on the Flash Pro forums as there's a larger developer audience there and someone might have a quick answer for you.  Next, you might want to open a new bug at bugbase.adobe.com.  Please include detailed steps to reproduce, along with a link to your site and / or sample code so we can test this internally.

  • [svn:osmf:] 15114: Don't check policy file when loading SWFs.

    Revision: 15114
    Revision: 15114
    Author:   [email protected]
    Date:     2010-03-29 12:24:58 -0700 (Mon, 29 Mar 2010)
    Log Message:
    Don't check policy file when loading SWFs.  Don't import local SWFs into current security domain.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/elements/ImageLoader.as
        osmf/trunk/framework/OSMF/org/osmf/elements/SWFLoader.as
        osmf/trunk/framework/OSMF/org/osmf/elements/loaderClasses/LoaderUtils.as

    If you managed to get to the point where the applet container is created (the "gray square"), but the form never appears then you can assume one or more of the following has occurred:
    1. The JRE crashed after startup. Many times, but not always, if such a crash occurs it will leave a JRE dump file on the desktop. Its content may help to identify the cause.
    2. The Forms runtime crashed at startup. Many times, but not always, a Forms dump file will be created on the server. Its content may help to identify the cause.
    3. The Forms runtime was unable to start at all. This can occur on unix systems when/if there is a resource or permissions issue. One of the more common causes is if the file descriptor (nofiles) value is set too low.
    4. The applet is actually running, but has attempted to display a dialog box and is awaiting your acknowledgement, but the box was wrongfully sent to the background behind the browser. A similar issue was reported in one of the JRE 1.6.0_xx series, however I don't recall which one. Uninstall your current version and install the latest which is 1.6.0_27
    There are other possibilities, but these are most common.
    I would recommend the following:
    1. Uninstall any JRE older than 1.6.0_27. Reboot. Install 1.6.0_27
    2. Set networkRetries=5 in formsweb.cfg
    3. Set FORMS_TIMEOUT to 15 (default). Setting to a high value as you have is not recommended and is rarely necessary.
    4. Verify that the test form works. For example:
    http://machine:port/forms/frmservlet?form=test
    5. It appears that you are trying to use WU_TEST_106.fmx. Instead, download an updated version of this file (the name has also changed)
    http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/196249.zip
    6. Ensure that you have compiled webutil.pll into .plx. Do not use an old version of this file. The installation will include one. If not, check for it in an installation that also includes the Builders.

  • Solaris process memory usage increase but not forever

    On Solaris 10 I have a multithreaded process with a strange behaviour. It manages complicated C++ structures (RWTVal or RWPtr). These structures are built from data stored in a database (using Pro*C). Each hour the process looks for new informacion in database, builds new structures on memory and it frees older data. But, each time it repeats this procedure, the process memory usage increases several MB (12/16MB). Process's memory usage starts from 100M until near 1,4G. Just to this point, it seems the process has memory leaks. But the strange behaviour is that after this point, the process stops to continue growing up anymore. When I try to look for memory leaks (using Purify tool) the process doesn't grow up and no significant leaks were showed. Did anyone found a similar behaviour or can explain what could be happening?

    markza wrote:
    Hi, thanks for responding
    Ja, i guess thats possible, but to do it all one row by row seems ridiculous, and it'll be so time consuming and sluggish surely.  I mean, for a months worth of data (which is realistic) thats 44640 individual queries.  If push comes to shove, then I'll have to try that for sure.  
    You can see by the example that I'm saving it to a text file, in csv format.  So it needs to be a string array, a cluster won't be of much help I dont think.
    The only other way I can think of is to break it up into more manageable chunks...maybe pull each column separately in a for loop and build up a 2D array like that until the spreadsheet storing.  
    You only do 1 query, but instead of Fetching All (as the Select does) you'll use the cursor to step through the data.
    You can use Format to String or Write Spreadsheet fire with doubles.
    You can break it down to get the data day by day instead of a full month at once.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • 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.

  • How to detect the end of a loaded swf file

    Hello Guys
    This is my first time on this forum, come here with a great
    hope
    I have loaded a picture file (jpeg) and a video file (swf)
    into the main flash file using xml
    on frame 3, I load the picture and on frame 7, I load the
    video, there is a stop action on frame 6
    Now when the flash is executed the picture is displayed ( it
    says "Click here to view the video")
    when the user click the picture , the video is loaded and
    starts to play ---- so far everything is working fine
    now what I want to do is, once the video finishes playing (
    not stoped) I want to display the picture again
    can you tell me how to detect the end of an external loaded
    swf files,
    Please help me
    Thanking You
    Shriram

  • Sql memory usage increase each time win app runs

    Hi,
    Sql memory usage increases each time when win app runs. Why does it work like this? Is it normal ?
    I restart SQL Server 2012. Only my win app uses SQL server.
    First run of winapp.
    start memory usage : 211.800 KB
    close memory usage: 528.136 KB
    Second run of xaf app.
    start memory usage : 528.136 KB
    close memory usage: 996.844 KB
    Third run of xaf app
    start memory usage : 996.844 KB
    close memory usage: 997.640 KB
    Fourth run of xaf app
    start memory usage : 997.640 KB
    close memory usage: 1.104.864 KB

    Hi,
    Sql memory usage increases each time when win app runs. Why does it work like this? Is it normal ?
    Yes, it is perfectly normal for SQL Server to acquire and hold onto large amounts of memory indefinitely.  This memory improves performance by avoiding disk I/O, query plan compilation and costly memory management. 
    On a dedicated SQL Server you should usually let SQL Server dynamically manage memory.  It will release memory if it detects memory pressure.  But if you often run other applications on the server than need significant amounts of memory (e.g. IIS,
    application services), you may want to set max server memory as suggested.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Loaded swf file alignment

    when i i design something in a file i have it aligned how i
    want it, however when i load the page into another, although the
    loader component is aligned, the content inside the loaded swf file
    is no longer where it should be. why is that? how can i fix this?
    i've just been

    Also, remember that if you load an external SWF into another
    movieClip, then the _root changes. The loaded SWF will no longer be
    considered _root, unless you specify in frame 1:
    this._lockroot = true;
    this would be the issue of your miss-alignment, if you are
    using ActionScript to align objects dynamically.
    If you are not using actionscript for alignment, then
    Mocaloca's suggestion should be the answer.

  • How load swf file (flash 8) with adobe captivate 3 without enter the HTML?

    How load swf file (flash 8) with adobe captivate 3 without enter the HTML?

    Hi SaSQuaCh69247,
    Issue 1 :- Select the SWF file in library, right click, and
    select update.
    Issue 2 :- Actually it could be valid for Issue 1 also. It
    seems like SWF file you are trying to import, does some action
    like, importing another swf or connecting to server on the first
    frame itself. Captivate will try to play the first frame of SWF
    when you import them. Try creating a keyframe with the stop action
    as the first frame in your SWF, and see if you still have the
    issue.
    Issue 3 :- The approach I am mentioning over here is
    generally the last approach which I will take in such scenerios,
    but since you have already experimented a little, so try this.
    Go to C:\Documents and Settings\<user name>\Application
    Data\Adobe\Adobe Captivate
    Rename captivate_v20.dat as captivate_v20_org.dat.
    Restart Captivate Application.
    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

  • Photoshop crashes when loading a file or image

    Using Photoshop cs3 on a PC with Windows 7 installed.
    Major Problem: Photoshop gives no response when opening an image of any sort or psd file which ends out with the options to either close the program or close and find a solution online which gives no solution whatsoever.
    PScs3 was working just fine when installed but after installing an NVIDIA plug-in did it start bearing some problems. When loading png files, a window normally appears telling me that Photoshop could not parse the file. After seeing this I went to uninstall the plug-in. The problem seemed to went away but shortly after was Photoshop crashing at random, and I do mean random. Starting Photoshop at first seems to nullify the chances of crashing but after either a short period of time or a long period of time will it crash when trying to open a file. Opening multiple files at once doesn't work either but when opening only one file into PScs3 will it cooperate until opening a second. I'm not sure if the plug-in is what caused the problem but I do know everything from there seems hectic. Every crash leads me opening PScs3 again with all of its settings reset from when I first exited normally.
    Plugin Used:
    Photoshop_Plugins_8.23.1101.1715
    Appications Type; 4,317 KB
    Company - InstallShield Softwere Corporation
    Have you tried uninstalling and reinstalling the program?
    Unfortunetly yes I have attempted this and the problem still occurs towards cs3. This makes me fear that the entire program is glitched.
    Do you have any other plug-ins installed?
    I've checked and there are no other plug-ins attatched.
    This is my last option before seeing to reformat my computer. If there is any input about the topic, now is the time.

    Just a hunch: change your default printer to something else (a locally attached printer, not networked) or "PrintToPDF", then relaunch Photoshop and try again.
    It could also be a plugin (try disabling ALL third party plugins).
    And it could be a bad OS install, a virus, etc.  It may take a while to find.

  • Ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • How to create an xml to load swf files in sequence?

    hello everyone
    I'm new in web design... I know how to animate in flash, using timeline, frames, layers, twins and so on... But I want to move forward so I want to create a xml to load swf files in sequence and in loop. Each swf file has 8 seconds.You can see the example here in www.cm-seixal.pt.
    I'm not a programmer but I understand how actionscript works... I hope you can help me
    Cheers!
    Ana

    you can use the urlloader class to load your xml file.  use the loader's complete event and the loader's data property to retrieve the data in your xml file.

  • Loading swf files from an iPhone Air App

    Although the faq says its possible ( http://bit.ly/gyxmCo  )  I can't seem to load .swf files from my app.
    There's no .AS code in the .swf file I'm trying to load.
    PNG files load with no problems, swf's fail.
    A working example would be appreciated instead of suggestions, I've spent the entire day trying out suggestions
    regards,
    Martijn

    Because I can't see any library assets in an as2.0 file.
    I've discovered that the swf fails to load as soon as you make a symbol 'export for actionscript'
    probably because it will then create a class. So you can only load SWF's as simple pictures or animations, you cant use it as an asset library with multiple animations/images/sounds in it..
    As for you other questions:
    it doesnt matter if the file is local or on the web. same results
    I created the swf file from a fla in CS4,  and I'm compiling my air project that loads the swf  with FlashDevelop.

  • Bridge CS5 Very Unstable when Previewing SWF files - fixes pending?

    Bridge CS5 is very unstable when an SWF file is playing back in the Preview panel.
    I only have to switch to another window, and Bridge bombs out.
    Is this a known issue? Is a fix pending?
    Thanks
    Richard
    I'm on XP Pro SP3.

    That's a very "Curt" response!
    The graphics driver is the latest available for my graphics card - a NVidia Go 7900GS.
    Thanks
    Richard

Maybe you are looking for