Flex :: BitmapData Heavy Usage - Memory Disaster (Spark / FB4)

Apr 12, 2010

I've got a flex component which works pretty well but unfortunately turns into a disaster once used in a datagroup item renderer of about 40-50 items. Essentially it uses bitmapdata to take screenshot of a fully-rendered webpage in mx:HTML (this version of webkit rocks btw, miles better than flex 3). The code is pretty self-explanatory I think. [URL]. I've optimized it all I could, browsed, search for answers and already trimmed it down a lot, I'm desparate to reduce the memory usage (about 600mb after 100 draw). The Garbage collector has little effect.

View 3 Replies


Similar Posts:


Flex :: Spark Datagrid Memory Usage With Dynamic Columns?

Jun 4, 2011

I have a question about the Spark DataGrid and how it works in terms of garbage collection. What I'm finding is that if I dynamically add and remove columns from the DataGrid at runtime, the GridColumns and ItemRenderers never get freed from memory.

For instance, if I have a list with 10 items and I create 10 columns, there will be 100 ItemRenderers and 10 GridColumns. If I remove all of the columns, they are still there.

[Code]...

View 2 Replies

Flex :: Flash - Total Memory Usage And TaskManager Memory Usage Are Different?

Aug 24, 2010

I wrote an application in flash AS3, and when I trace from flash the total memory usage of the total application is only about 9MB, But at the same time Task Manager Shows the memory usage as 110MB. Around 100MB difference.Flash Trace Method System.totalMemory difference of the Trace from the Beginning of the application to end of the application.

View 2 Replies

Flex Application Memory Usage?

Mar 4, 2011

System.totalMemory gives the total memory used by the flash player and not one particular application. Is there any way I can get the flex application's memory usage in code/actionscript?

View 3 Replies

Flex :: Get CPU Usage And Memory Consumption From Flash?

Feb 25, 2011

Is there any way i can get CPU usage and CPU memory usage details in flex? I know that flash can't access any system resources.

View 2 Replies

Flex :: Check The Performance & Memory Usage Of Flash Application At Run Time?

Aug 17, 2010

I have a flash application which consist of Grid Components, Button, Label, and Combo-box Components. All these components are used more than 70 times(simultaneously) with in the application. So Its takes too much of memory. So How can I test the memory usage of each component at the time of running. Is there any plug-in available for browsers to find the memory usage. I'm using flash CS3 and ActionScript 3.0. The application suppose to run in browsers.

View 4 Replies

Performance :: Flex - Memory Usage When Using Visible Versus Add / Remove From Stage

Jul 28, 2011

Is there a performance and/or memory usage difference between these two scenarios?
Scenario 1: N visual elements all added to stage;
N-1 have visible = false, 1 has visible = true;
Scenario 2: N visual elements, only 1 added to the stage at any time.

View 1 Replies

Flex :: Spark VideoDisplay With Long Wait High CPU Usage In Google Chrome (and Opera)

Sep 6, 2011

I've created a Flex website that plays a video using the Spark VideoDisplay component. When selected, the VideoDisplay loads in the PopUpManager.

This works fine in all the browsers, except Google Chrome take significantly longer to start playing, during which the CPU usage peaks, then goes back down once video starts playing.

I've traced the player states it goes through and they are as follows:

Loading ready (hangs for ages with high cpu) buffering playing (immediately after buffering, CPU usage goes down, video plays smoothly)

What could be causing this to temporarily hang for so much longer in Chrome? I thought I could expect the same functionality and behaviour throughout all the browsers, as Flash is simply a plugin that runs as a separate process?

Edit: It seems that it's the same in Opera too. Is there any commonality between the two that would explain this behaviour?

[Code]....

View 1 Replies

Flex :: Spark Combox Memory Leak?

Feb 12, 2011

I have a simple, reproducable memory leak associated with the Spark Combo box, however I'm convinced it must be something I'm doing wrong, rather than an SDK bug.

// Application.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code]....

Note - this doesn't occur when the application is compiled against Flex Hero.It appears as though this is a bug, but I cannot believe that the ComboBox has a memory leak -- surely this would've been fixed before 4.1 was shipped? Update I've done further investigation into this, and believe the issue lies in a problem with the RichEditableText component that the ComboBoxSkin uses.

View 2 Replies

Flex :: Spark VideoDisplay In Popup Causes Memory Leak

Jun 3, 2010

I'm currently building an air app with FB 4.

I have a custom control that contains a VideoDisplay control, and which loaded using the PopupManager.

Using the profiler, i've noticed that every time the my popup is loaded the memory for it gets allocated, but when it's closed the memory is never recovered.

There's nothing else holding a reference to the popup. And if I don't set the source of the VideoDisplay object, then there is no leak - but as soon as the source is set I get a leak.

I can't see any method to force close the stream or anything on the spark VideoDisplay control.

EDIT: I have tried setting the source to null before closing the popup but that doesn't change anything.

Also, I'm not holding any event listener to the video.

Edit 2: It doesn't happen if I replace the spark VideoDisplay with an mx VideoDisplay. Bug in the spark component?

View 1 Replies

Flex :: BitmapData Allocates A Lot Of Memory When Created

Feb 2, 2012

I have an application which manipulates high resolution images (something around 100+ megapixels), and I'm having some memory issues. When the BitmapData object is created, it allocates memory to store this image. The problem, is that I already have a ByteArray with this image's pixels (which have something around 400+ MB), so when the BitmapData is created, it allocates memory to store the same data that I have on the ByteArray. After its creation, I can set the pixels from the ByteArray to the BitmapData and free the ByteArray. But this memory peak is, sometimes, causing the runtime to raise an exception, telling that the system is out of memory. Is there any way to tell the BitmapData to use my own ByteArray? Or any other solution that I don't have to use double the memory that I need?

View 1 Replies

ActionScript 3.0 :: BitmapData = New BitmapData(); Eating Up Memory?

Dec 22, 2011

I've made a mobile version of my software, with low-res images and such, and I can now fully buffer all my content (including a 360 frame animation which is buffered to memory). Problem is, that everytime I update the view, more memory is used.When I write image = new BitmapData();, does it store the previously created BitmapData's in memory? Do I have to flush the memory somehow before I draw my second picture in BitmapData?Example:

ActionScript Code:
// In this example I draw using the same bitmapData several times, also
//overwriting the first image. Do I have to somehow delete the data first, to

[code].....

View 1 Replies

ActionScript 3.0 :: Flash CS3 Memory Usage

Jul 6, 2009

How much memory in bytes can Flash normally handle? I have a fairly involved program that is running at 39MB usage and now may be causing some memory issues (I'm not sure it's the memory, since it was running smoothly up until I made a few code changes and now Flash freezes after making those changes). But anyway, I have been wondering about memory usage and Flash CS3 and felt like this was a good topic to dicuss. Is there a way to force an increase in available memory for Flash?

View 2 Replies

ActionScript 3.0 :: Flash - Too Much Memory Usage

Aug 20, 2009

I am doing a flash getting data from mysql. My Database is quite big (200+MB) with lots of datas. here is my problems, after using my flash for some searching, maybe because of calling mysql to get too much data (like getting 900 records with their names and images), my memory usage increase to over 2 GB. Thus my flash is dead. I need to restart it. Is there any ways to reduce the memory usage?? Or it might be some other problems. I am quite new at my job, so it might be something that I forget to close ot remove.

View 2 Replies

ActionScript 3.0 :: Load External SWF Memory Usage?

May 4, 2009

Did a website, but at the end of it... i needed to translate everything So I simply made a duplicate translated all the text, and added a button on each that will jump between the languages. Button added to main stage. Inside button on DOWN action:

if (MovieClip(parent).mainContainer.numChildren!=0)
MovieClip(parent).mainContainer.removeChildAt(0);
var ii:int=parent.numChildren-1;
trace(ii);

[code]...

I have tried to remove all children from the stage, but then upon loading, I get an error; looks like I removed the stage,timeline etc. So I had to leave the parent.numChildren at -1 to leave the mainContainer (but clean it inside). It works, but now Firefox memory increases each time I click on the Language Change button:

126K
208 K
288.5K
369.7K
450.0K

EDIT: The line stage.addChild() creates error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at final_webMon_fla::MainTimeline/frame1()

View 3 Replies

ActionScript 3.0 :: Using .load() And .unload() In Regards To Memory Usage

Aug 13, 2010

I'm struggling to understand this, so I'm hoping someone can explain how to further enhance the functionality of my simple unload function, or maybe just point out some best practices in unloading external content. The scenario is that I'm loading and unloading external swfs into my movie(many, many times over) In order to load my external content, I am doing the following:

[Code]...

View 2 Replies

Actionscript 3 :: Flash Memory Usage In Browser?

Oct 16, 2010

When I run my swf locally in the Flash Player application, its memory usage starts at around 50 Mb, and though it definitely fluctuates, it generally stays centered at around 50 Mb. Then I embed the same swf in an html page and run it in my browser (firefox). Now the memory usage starts at 20 Mb, but increases at a near constant rate until it is over 100 Mb and I need to stop it. The swf is essentially unusable in the browser because of this.

What could be the cause of this huge difference in behavior? Where should I even begin when trying to make the swf functional in the browser? EDIT: I have found what was causing the problem (sort of). A certain type of object, which gets spawned a lot during the game, doesn't respond to removeChild() correctly. As a result these types of objects were building up on the stage (but invisible) and causing the memory usage to skyrocket. This doesn't occur when I test it in CS4 or in the standalone flash player application, only in the browser. It seems like a Flash bug.

View 2 Replies

ActionScript 3.0 :: Upload And Memory Usage In Flash?

Nov 2, 2009

I have a movie that am loading external 27 movie clips. after a while the flash projector crushes. when i look at the the task manager flash Mem usage is 171000k.

the more i upload the more the memory keeps increasing. i thought when u upload a movie clips in flash they keep replacing the one before and so the memory does not keep increasing?

--kharddie
var loaderScenario:Loader;
loaderScenario =new Loader();
loaderScenario.contentLoaderInfo.addEventListener(

[Code]....

View 0 Replies

ActionScript 3.0 :: Memory Usage With Embed Statement

May 18, 2010

how memory is assigned for an embedded graphic? I'm using an embed statement to include a 240kb splash screen into my code and it seems to massively increase the memory usage out of all proportion to its size.

ActionScript Code:
[Embed(source = '../splash.png')]public var splashScr:Class;
private var ss:Bitmap;

[Code].....

With a 1kb splash screen an ongoing trace of system memory bottoms out at ~3500kb, whereas with the 240kb screen it never drops below ~6500kb.

View 4 Replies

Custom Movie Clip Class And Memory Usage?

Jul 9, 2009

I need to create a hundred instances of a movie clip.Is it better to add functions for these movie clips in the movie clip class or in a separate class?For example I have move(), setPosition(), setRotation() functions, would this create these functions a hundred of time and take memory place or just reference the functions?

View 1 Replies

Unloading External Swf File Keeps Memory Usage Growing Up?

Dec 7, 2009

The idea is very simple: I have a submain.swf with 5 buttons. Each button loads an external .swf loader.load(URLRequest);After playing first external swf, before I go to next one, I try to unload it1. remove all its associated listeners:com_loader.contentLoaderInfo.removeEventListener(Event.INIT-PROGRESS-C OMPLETE, idFunction);2. unload it:

View 3 Replies

ActionScript 3.0 :: ViewStates - Accumulative CPU Cycle And Memory Usage

Apr 5, 2011

I have a flash file system created using Adobe Flash builder CS5 containing nested movie clips. I use Action Script 3 class (using Flash Builder) to go to different frames using gotoAndPlay() statements (these frames constitute different view states of the system). In my system I have around 10 view states starting from Welcome, Action1, Action2, ..., to EndOfAction(Bye).

In order to display these viewstates I use gotoAndPlay(). These viewstate are repeated sveral times in almost the same order. Each view state has multiple nested movie clips containing animations. Everything works fine during initial cycles. But after every cycle of viewstates, I find that the CPU usage and Memory usage are increasing. After around 10 cycles the use of CPU is such that the animations become very slow.

In the Action Script 3 the code will look like as following.
switch (viewstate) {
case "welcome":
target.gotoAndPlay(welcomeLabel);
break;
case "action1":
target.gotoAndPlay(action1Label);
break;
}
Anybody could enlighten me what is happening here, and tell me how I can get rid of excessive, accumulative cpu and memory usage.

View 3 Replies

Flash :: Memory Usage And Garbage Collection Of Objects?

Jun 1, 2011

I want to know about the Object type specifically when it comes to garbage collection in Flash.

I know that items will be ready for garbage collection in situations like this:

[Code]...

View 2 Replies

ActionScript 3.0 :: Memory Usage When Loading External Movies?

Dec 13, 2010

I have a flash application running on some local machines. There are 3 movies the flash loads and plays. Each time a movie is played, it makes the amount of RAM the swf is using increase. This is being ran in a museum and users step through the 3 movies over and over and over, causing the swf to use gigabytes of RAM and eventually locking up the flash player.

Here's where I create the movie playback component.

ActionScript Code:
var flvPlayer:FLVPlayback = new FLVPlayback();
addChild(flvPlayer);

The 3 movies are on 3 different frames in the timeline, for each frame I have this code that loads each movie.

ActionScript Code:
flvPlayer.source = "resources/LADEE_overview.f4v";
flvPlayer.play();
flvPlayer.addEventListener(MetadataEvent.CUE_POINT, cuepointfound);

I use the cuepoints to display some text on screen. I also call a function that does flvPlayer.stop(); each time the user navigates away from a movie frame. So is the RAM usage growing because of the flvPlayer.source = "whatever" being triggered each time the movie is called up?

View 5 Replies

ActionScript 3.0 :: Touchscreen Project - Memory Usage Optimization

Jan 12, 2011

I am working on a touch screen project right now. There is a chance that the touchscreen will never be turned off, so I have to be very aware of the memory issue with the pc. I don't want the memory to keep building up and eventually it just freezes up the pc. Basically, I have separated each section into a separate swf. The idea is to load only the swf that is needed in order to optimize memory usage. I tested the app on a pc, when looking at the "processes" in the window task manager, it seems the memory used will just keep increasing as I navigate through the application, it seems to me it just keeps piling up external swfs in the application, but sometimes the memory will just suddenly decrease. And when the touchscreen application is idle, the memory will drop too.

The following code is what I used to load and unload the external swf. Did I do it right? Is there anything that may have left unnoticed that is still staying in the memory? Is there any other way to optimize the memory usage too?
ActionScript Code:
var prevLevel:* = this.parent;
var currentPage:MovieClip;
var oldPage:MovieClip;
var bgID:String;
[Code] .....

View 0 Replies

ActionScript 3.0 :: Flash Streaming Video Memory Usage?

Aug 10, 2010

My problem is going to be hard to outlay in detail due to NDA's I am bound to, but the gist is this..I have a swf application the progressively streams content from a cdn edge server.I have built a video player class and instantiate a new one for each new piece of footage I find.Naturally this requires good memory management to ensure no leaks..... and herein lies the problem (surprise).

I have unregistered all my event listeners (not using weak at present) and nulled all objects from my media player object.I slice it from my list and call a destroy method that cleans up all objects setting references to null. Once this is done I call System.gc().My profiling tools are showing that my memory usage is continuing to increase linearly for each new video clip. The jump is about 5mb each time the approx size of each video file.

Is the built in "Video" component on the stage (players all share the same one) a built in type?

View 3 Replies

ActionScript 3.0 :: [flash Cs4] Memory Usage Utility Classes?

Oct 4, 2010

I have a class just full of random STATIC functions and vars that I use often on alot of other classes. things like the classic randRange(min, max) function. . just silly things i dont want cluttering my code My question is does importing this class into other classes increase the memory used by instances of the class. Cause i may import this class of 30 objects and only use 2 of them. I'm thinking it doesn't. But i could be wrong as I haven't found much material on flash memory usage other than garbage collector stuff.

View 1 Replies

Java :: Referactoring Code In Php To Optimize Runtime Memory Usage?

Jul 22, 2010

I used to write programs in the android sdk for google phone. One of the android developers guide that I read says that it is more efficient to declare a const public static const NO:String = "no";

var1 == NO;
var2 = NO;
than to do this

[code].....

View 1 Replies

Actionscript 3 :: Object Memory Usage With Static Vs. Instance Methods?

Nov 17, 2010

This has been a long-standing curiosity of mine, and I haven't gotten around to profiling to find out, and haven't seen it asked yet (for AS3):Let's say that I have a class:

class MyClass {
public function myMethod():String {
return "some return value";

[code]....

View 1 Replies

Media Server :: FMS 4.5 Crashing - Shared Memory Heap Has Exceeded 90 Usage

Dec 6, 2011

FMS is crashing with the following errors:
 
2011-12-06  10:24:02    12461   (w)2581227  Shared memory heap (__FCS__) has exceeded 90 usage. Consider increasing the heap size to prevent future memory allocation failures. -2011-12-06  10:24:02    12461   (w)2581227  Shared memory heap (__FCS__) has exceeded 90 usage. Consider increasing the heap size to prevent future memory allocation failures. -2011-12-06  10:24:02    12461   (w)2581227  Shared memory heap (__FCS__) has exceeded 90 usage. Consider increasing the heap size to prevent future memory allocation failures. - 
When I try to restart I get:
 
2011-12-06  17:33:27    7933(e)2781340  Process 7933 failed to create IPC queue __FCS__ : Failed to allocate shared memory. - I've noticed the problem resolves when I restart fmsadmin. I think fmsadmin is using up all the shared memory, not sure. There are HTTP requests periodically being sent to fmsadmin, could this be a source of memory leak?
 
The server has 6 GB RAM and there are only about 100-200 connections being used. Runs without issues most of the time, crashes once every few days.What is the shared memory heap and how do I increase it?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved