RE: [Flashcoders] High CPU usage problems
Triple check the intervals - they are notorious for causing problems. It's always a good idea to clear intervals before you set them - that way if they accidentally get set twice you'll know the first one will get cleared... clearInterval( myInt ); myInt = setInterval( myFunc, 1000 ) J -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Makely Sent: 22 March 2007 16:04 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] High CPU usage problems If you are doing a lot of createEmptyMovieClip() and attachMovie(), then make sure that those movieclips are getting removed when you are done with them. If you are fading those clips away, but never removing them from the stage with removeMovieClip() (*not* delete), CPU performance will surely suffer as the number of invisible movieclips increases. Also double-check to see if your intervals are actually getting cleared. If you are using intervals to do multiple tweens, make sure that they ALL get cleared. Also beware of intervals declared in loops because if you are not careful, you can overwrite an interval with a new one. This leaves the previous one uncleared and unaccessible as well. -- andy makely On 3/22/07, Carl Welch [EMAIL PROTECTED] wrote: I programmed the Portfolio Section. Bring up the task manager and watch the performance graph. You can watch it start to bogg down after a while of clicking around the portfolio section. Its loading xmls (one for the Side Menu) and the other for the thumbnails and theire respective data. There are quite a few createMovieClips and AttachMovieClips and some setIntervals - which I do clear when I'm done. When I create a tween object I try to kill it when I'm done using it with delete myObject; - not sure if that even works. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] High CPU usage problems
Hi, There a presentation related to garbage collection (effective deleting/removing) and some performance related stuff. All in relation to AS3, but applicable in many situations: http://www.gskinner.com/talks/resource-management/ Carl Welch Hi Coders, Carl Welch I've been having problem with some the apps I've been building. The CPU gets Carl Welch really bogged down like with usage often at 100%.I tend to use alot of tween Carl Welch classes, load external images and XML. I've never really had a good grasp of Carl Welch what to do with things regarding memory Carl Welch usage(programatically). I like to Carl Welch keep all my scripting on one frame and have function do what I need do. Carl Welch Currently, I am having the problem with this project: Carl Welch http://www.artandsignfx.com/temp.html Carl Welch I programmed the Portfolio Section. Bring up the task manager and watch Carl Welch the performance graph. You can watch it start to bogg down after a while of Carl Welch clicking around the portfolio section. Its loading xmls (one for the Side Carl Welch Menu) and the other for the thumbnails and theire respective data. There are Carl Welch quite a few createMovieClips and AttachMovieClips and some setIntervals - Carl Welch which I do clear when I'm done. When I create a tween object I try to kill Carl Welch it when I'm done using it with delete myObject; - not sure if that even Carl Welch works. Carl Welch Can anyone offer any advice or point me in the direction of a really good Carl Welch article regarding this subject?. -- Pozdrowienia, BlackMail -- Jestes kierowca? To poczytaj! http://link.interia.pl/f199e ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] High CPU usage problems
Hi Carl, I understand the problem. Can be a real pain in the *ss to figure it out. Especially because so many things can cause the problem. You should double check you actually do clear your intervals + enterframes, but in my experience, the thing that kills the cpu the most is the effort flash has to put in redrawing your screen. So double (triple) check you are actually removing all non-visible elemelents. If e.g. you keep attaching/creating a couple of animating clips with some content and forget to remove them, it will definitely kill the cpu sooner or later. (especialy images which are almost always dynamically created/loaded seem to be a good place to look in general). Good luck, Ben Smeets -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carl Welch Sent: donderdag 22 maart 2007 5:51 To: Flashcoders mailing list Subject: [Flashcoders] High CPU usage problems Hi Coders, I've been having problem with some the apps I've been building. The CPU gets really bogged down like with usage often at 100%.I tend to use alot of tween classes, load external images and XML. I've never really had a good grasp of what to do with things regarding memory usage(programatically). I like to keep all my scripting on one frame and have function do what I need do. Currently, I am having the problem with this project: http://www.artandsignfx.com/temp.html I programmed the Portfolio Section. Bring up the task manager and watch the performance graph. You can watch it start to bogg down after a while of clicking around the portfolio section. Its loading xmls (one for the Side Menu) and the other for the thumbnails and theire respective data. There are quite a few createMovieClips and AttachMovieClips and some setIntervals - which I do clear when I'm done. When I create a tween object I try to kill it when I'm done using it with delete myObject; - not sure if that even works. Can anyone offer any advice or point me in the direction of a really good article regarding this subject?. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] High CPU usage problems
If you are doing a lot of createEmptyMovieClip() and attachMovie(), then make sure that those movieclips are getting removed when you are done with them. If you are fading those clips away, but never removing them from the stage with removeMovieClip() (*not* delete), CPU performance will surely suffer as the number of invisible movieclips increases. Also double-check to see if your intervals are actually getting cleared. If you are using intervals to do multiple tweens, make sure that they ALL get cleared. Also beware of intervals declared in loops because if you are not careful, you can overwrite an interval with a new one. This leaves the previous one uncleared and unaccessible as well. -- andy makely On 3/22/07, Carl Welch [EMAIL PROTECTED] wrote: I programmed the Portfolio Section. Bring up the task manager and watch the performance graph. You can watch it start to bogg down after a while of clicking around the portfolio section. Its loading xmls (one for the Side Menu) and the other for the thumbnails and theire respective data. There are quite a few createMovieClips and AttachMovieClips and some setIntervals - which I do clear when I'm done. When I create a tween object I try to kill it when I'm done using it with delete myObject; - not sure if that even works. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com