Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-17-2005, 11:58 AM   #1
badlorry
Registered User
 
Join Date: Feb 2005
Location: London
Posts: 177
Default 24/7 Memory Leak

I have a (Flash MX 2004 pro) live news application that is going to be running 24/7 on an extremely large video screen, which is pulling in live data and images from 12 XML newsfeeds, all in different languages from around the globe, every 20 minutes or so, to display in a series of scripted animations. The news is interspersed with a series of embedded video sequences.

This amounts to a huge amount of data and image files, which need to be loaded up dynamically every day. My problem is therefore to do with memory leaks.

I have, as far as I can see, a very tightly controlled application, all classes, functions, objects, references and variables have been scoped carefully to avoid any unnecessary memory usage. I delete unused items, have no runaway numbers, no infinite loops, and data and XML objects are deleted as soon as the data is harvested from them.

Performance is absolutely fine after 24 hours, with no lag in any of the many scripted animated sequences. However, I have noticed that when the XML data is loaded, even though the XML object is clearly removed after each load and parse, upon inspection of the task manager, the memory usage has increased by what seems like a similar amount to the size of the XML files.

This amounts to 100mb of extra memory usage over 24 hours, which will become a problem unless the application is restarted.

Has anyone encountered similar problems with long-running applications?
badlorry is offline   Reply With Quote
Old 02-17-2005, 12:18 PM   #2
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

I haven't dealt with any Flash applications that needed to run for long period of times, but MM is pretty notorious for memory leaks, so I would assume that its a problem with the player. What you may want to try doing (and I dont know if this will even have any effect at all) is using loadMovieNum to load in the _url (the movie itself) back into level0 effectively restarting the application every 24 hours. This won't restart the player itself, just reload the swf playing in it... which is why Im not sure it will really do anything. :-/
__________________
(6)
senocular is offline   Reply With Quote
Old 02-17-2005, 01:02 PM   #3
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

restarting the app is a very good idea. this can be acheived through javascript me thinks.
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 02-17-2005, 01:34 PM   #4
badlorry
Registered User
 
Join Date: Feb 2005
Location: London
Posts: 177
Default

I thought it might be the player. I can't see how it could be my scripting as it's as tight as a gnat's arse.

so much for flash handling memory allocation by itself then. I guess they never intended it to be as robust an application as I'm currently wanting.

I guess Flash's "garbage collector" (http://timotheegroleau.com/Flash/art...cope_chain.htm) is not all it's cracked up to be.
badlorry is offline   Reply With Quote
Old 02-17-2005, 01:39 PM   #5
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

check out flashguru.co.uk, they have something simmiloiar going ...
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 02-17-2005, 01:43 PM   #6
badlorry
Registered User
 
Join Date: Feb 2005
Location: London
Posts: 177
Default

yeah, I saw that this morning, that graffiti business for MXDU, but not sure if it's handling anything as much as my app is. still, I guess it may be having similar probs, thanks
badlorry is offline   Reply With Quote
Old 02-17-2005, 01:47 PM   #7
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

i have always noticed that when loading xml the mem increases with the load. guy and peter are also loading xml, so even though it might not be the same load it might be usefull. also both off them are exremely accesible, and the app they are writing has MM's backing [read Mike chambers and mike downey have supper with them] so they might have some info u need.

but its still a longshot
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:20 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.