This is good for faster transmission, though I use zip before I transfer the xml.
I am assuming you are talking about AMF, right? Is there something now that can compose AMF data other than Adobe server products? BTW, the main issue now is, once you have this object, and if it happens to be a 10M xml, then you can never free up the memory to get a new one, you will eventually crash as in my test app that I sent out. Thanks, --- In flexcoders@yahoogroups.com, li wenzhi <[EMAIL PROTECTED]> wrote: > > You could try to convert your xml string into Object in backend then deliver to Flex frontend to avoid this problem. > > > -------------------------------------------------- > lwz7512 > Ultrapower Flex Team Leader > OpenRIA -- A Window You Exploring RIA World > http://www.openria.cn > > > > ----- Original Message ---- > From: Rick Winscot <[EMAIL PROTECTED]> > To: flexcoders@yahoogroups.com > Sent: Sunday, March 30, 2008 9:42:15 PM > Subject: RE: [flexcoders] memory leak in converting string to xml > > 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] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ilam Mougy > Sent: Saturday, March 29, 2008 12:49 AM > To: [EMAIL PROTECTED] ups.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. > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ >