I agree. Feel free to ignore... since I don't know the requirements of your application. But, I would typically do heavy lifting (like the monitoring) on the back end (in Java, PHP, etc.) You could then use Flex for a admin/reporting type UI that sends config options and obtains data from the back end.

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com
http://blog.fastlanesw.com



Douglas Knudsen wrote:
which is really pushing limits IMHO.   I would never trust running a web app
for longer than a couple hours.  Heck, can FF or IE run for more than 12
hours without freaking out?

DK

On Sun, Mar 30, 2008 at 11:50 AM, Ilam Mougy <[EMAIL PROTECTED]> wrote:

  I agree with you, if there is a best practice, I will do it. I will
write a sample app and try with smaller chunks, I will share my test
results.
As for what I am doing, I am writing a monitoring app, always running
then testing then writing a report. I am hoping the app will be
running months without any restart.

ok, will be back soon with results...
Thanks for the time,

--- In [email protected] <flexcoders%40yahoogroups.com>, "Rick
Winscot" <[EMAIL PROTECTED]>
wrote:

I'll bite! You know. I'm a big proponent of "just because you can -
doesn't
mean you should." The case of loading a 20mb text (xml) file. I
think would
qualify. To be fair I did try a few experiments with the xslspec
(http://www.w3.org/TR/2001/REC-xsl-20011015/xslspec.xml) which is
nearly 25k
lines. I profiled a typical scenario of loading it as a string,
conversion
to xml and cleanup. The memory footprint was reasonable for the size
of text
- nothing to write home about. I did get some erratic results executing
repeated conversions (1 conversion per second for 10 seconds).
Still. things
settled down after about 120 seconds. Did I see anything that looked
like a
true leak? No. What I did see what the effect of a huge number of string
operations. and the memory footprint of a business case that made me
say -
"chunk it. or leave it." Flex is truly awesome, but I think that
what you
are trying to do has me wondering what the justification is (please
share).
Really - Flex will do what you ask it to do. it doesn't mean that it
will
perform well. but it will do it. This is true for any language - the
effect
is just more evident in ActionScript.



Rick Winscot







From: [email protected] <flexcoders%40yahoogroups.com> [mailto:
[email protected] <flexcoders%40yahoogroups.com>] On
Behalf Of Ilam Mougy
Sent: Saturday, March 29, 2008 12:49 AM
To: [email protected] <flexcoders%40yahoogroups.com>
Subject: [flexcoders] memory leak in converting string to xml
I am almost giving up on this issue, I don't know any work around.
Here is example, in AS:-

var strToBeXML:String = '<root>...</root>';// this is huge string,
20Meg xml for example.
myTrace('***** memory before xml conversion (A): ' +
System.totalMemory);
var xmlObj:XML = new XML(strToBeXML);
myTrace('***** memory after xml conversion (B): ' + System.totalMemory);
// now, there is no way to get rid of this increase in memory!
xmlObj = null;
myTrace('***** memory after xml deletion (C): ' + System.totalMemory);

protected function myTrace(str:String):void{
forceGC();
trace(str);
}
public function forceGC():void{
try {
new LocalConnection().connect('foo');
new LocalConnection().connect('foo');
} catch (e:*) {}
}

(C) is always similar to (B).
Any hits? I need to get rid of this xml object memory allocation and
I can't. I think I read all the articles about memory leaks. I
haven't used Flex 3 yet, but I am sure if I try and it says there is a
leak, so what, what should I do?

Thanks for your help.




Reply via email to