I have found that the FDS server is greedy and it will take as much memory
as you have to offer.

For example:

I have an application that shows 300 mb of ram being used by my Firefox
browser on Windows XP with 2 gb of machine ram.

The same application runs at only 90mbs of ram on a Windows XP machine that
has 500 mb of system ram installed.

Try running your app on an older machine or a virtual machine to see how
much ram it uses.

Rich

On 16 Mar 2007 08:05:40 -0700, vargaandrea <[EMAIL PROTECTED]> wrote:

  Hi,

I noticed that my project keeps using more and more memory, even when
it does nothing (or I thought so). I finally came to the conclusion
that remote calls causing it.

Here is a small test: http://virtualro.cluj.astral.ro/andi/memtest/

It has a timer that keeps updating a label with
flash.system.System.totalMemory, and a button that calls a remote
method using amphp (it does nothing, only returns 1).

Now, if you start the demo, you can see that totalMemory stays the
same, until you press the button. Then it starts to increase slowly
(the number changes in about every 6-8 secs). If you press the button
many times (=call the remote method), totalMemory increase is more
accentuate.

What is causing that, how could I avoid it? Something is wrong here.

Thanks.

Here's the code of my test:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="vertical"
xmlns:ns1="*"
xmlns:control="control.*"
initialize="initTimer()"
width="200" height="200">

<mx:RemoteObject
destination="amfphp"

endpoint="
http://virtualro.cluj.astral.ro/virtualro/adminBackend/gateway-modules_amfphp1_9beta2.php
"
id="testService"
source="TestService"
showBusyCursor="true"
result="onResult( event )"
fault="onFault( event )">
</mx:RemoteObject>

<mx:Script>
<![CDATA[
import mx.controls.Alert;

[Bindable]
public var totmem:Number = 0;

//timer for watching memory usage
public function initTimer():void {
var myTimer:Timer = new Timer(1000, 0);
myTimer.addEventListener("timer", timerHandler);
myTimer.start();
}
public function timerHandler(event:TimerEvent):void {
totmem = flash.system.System.totalMemory;
}

// remote call handlers
public function onResult( event : * = null ) : void {
trace("TestService::onResult " + event.result);
}
public function onFault( event : * = null ) : void {
trace("TestService::onFault ");
Alert.show("TestService has failed");
}


]]>
</mx:Script>
<mx:Label text="totalMemory: {totmem}"/>
<mx:Button label="Call Service" click="{testService.callTest();}"/>
</mx:Application>




--
Rich Tretola
<mx:EverythingFlex/>
http://www.EverythingFlex.com

Reply via email to