Re: [FlashCoders] Delegates and performance
> The same conclusion though, as long as you clean up your references to > delegates, which means no object.addListener ("click", Delegate.create()) > constructions, you'd be fine and there is no need to get all paranoid:). Thats exactly what i think. In most cases, there is even no problem using addListener with Delegate because 1) the listener is never removed, because it is always needed 2) the dispatch object itself is removed cheers, Janosch Hans Wichman schrieb: Lol ok, checking your links, it seems Dimitrios posted his problems on his game performance back then when he had the issues, and most of whom have responded now, responded back then as well, myself included. The same conclusion though, as long as you clean up your references to delegates, which means no object.addListener ("click", Delegate.create()) constructions, you'd be fine and there is no need to get all paranoid:). cheers JC On 10/24/06, Hans Wichman <[EMAIL PROTECTED]> wrote: Sorry Muzak last time I checked your links didnt work, but forgot to report it. Ill check m now. On 10/24/06, Muzak <[EMAIL PROTECTED]> wrote: > > As I mentioned earlier, this is a really old discussion: > http://www.peterjoel.com/blog/?archive=2004_08_01_archive.xml > http://chattyfig.figleaf.com/pipermail/flashcoders/2005-June/140994.html > > http://muzakdeezign.com/flashcoders/?q=delegate > http://muzakdeezign.com/flashcoders/?q=remove%20delegate > > etc.. > > regards, > Muzak > > - Original Message - > From: "Hans Wichman" <[EMAIL PROTECTED]> > To: "Flashcoders mailing list" < flashcoders@chattyfig.figleaf.com> > Sent: Tuesday, October 24, 2006 1:52 PM > Subject: Re: [FlashCoders] Delegates and performance > > > Hi, > i agree, but it is only true, as long as there is a reference to the > inline > function. > The text seems to suggest that although the reference to the inline > function > is gone, it still stays on memory. > > greetz > JC > > > ___ > 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 ___ 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] Delegates and performance
Lol ok, checking your links, it seems Dimitrios posted his problems on his game performance back then when he had the issues, and most of whom have responded now, responded back then as well, myself included. The same conclusion though, as long as you clean up your references to delegates, which means no object.addListener ("click", Delegate.create()) constructions, you'd be fine and there is no need to get all paranoid:). cheers JC On 10/24/06, Hans Wichman <[EMAIL PROTECTED]> wrote: Sorry Muzak last time I checked your links didnt work, but forgot to report it. Ill check m now. On 10/24/06, Muzak <[EMAIL PROTECTED]> wrote: > > As I mentioned earlier, this is a really old discussion: > http://www.peterjoel.com/blog/?archive=2004_08_01_archive.xml > http://chattyfig.figleaf.com/pipermail/flashcoders/2005-June/140994.html > > http://muzakdeezign.com/flashcoders/?q=delegate > http://muzakdeezign.com/flashcoders/?q=remove%20delegate > > etc.. > > regards, > Muzak > > - Original Message - > From: "Hans Wichman" <[EMAIL PROTECTED]> > To: "Flashcoders mailing list" < flashcoders@chattyfig.figleaf.com> > Sent: Tuesday, October 24, 2006 1:52 PM > Subject: Re: [FlashCoders] Delegates and performance > > > Hi, > i agree, but it is only true, as long as there is a reference to the > inline > function. > The text seems to suggest that although the reference to the inline > function > is gone, it still stays on memory. > > greetz > JC > > > ___ > 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] Delegates and performance
Sorry Muzak last time I checked your links didnt work, but forgot to report it. Ill check m now. On 10/24/06, Muzak <[EMAIL PROTECTED]> wrote: As I mentioned earlier, this is a really old discussion: http://www.peterjoel.com/blog/?archive=2004_08_01_archive.xml http://chattyfig.figleaf.com/pipermail/flashcoders/2005-June/140994.html http://muzakdeezign.com/flashcoders/?q=delegate http://muzakdeezign.com/flashcoders/?q=remove%20delegate etc.. regards, Muzak - Original Message - From: "Hans Wichman" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Tuesday, October 24, 2006 1:52 PM Subject: Re: [FlashCoders] Delegates and performance Hi, i agree, but it is only true, as long as there is a reference to the inline function. The text seems to suggest that although the reference to the inline function is gone, it still stays on memory. greetz JC ___ 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] Delegates and performance
As I mentioned earlier, this is a really old discussion: http://www.peterjoel.com/blog/?archive=2004_08_01_archive.xml http://chattyfig.figleaf.com/pipermail/flashcoders/2005-June/140994.html http://muzakdeezign.com/flashcoders/?q=delegate http://muzakdeezign.com/flashcoders/?q=remove%20delegate etc.. regards, Muzak - Original Message - From: "Hans Wichman" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Tuesday, October 24, 2006 1:52 PM Subject: Re: [FlashCoders] Delegates and performance Hi, i agree, but it is only true, as long as there is a reference to the inline function. The text seems to suggest that although the reference to the inline function is gone, it still stays on memory. greetz JC ___ 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] Delegates and performance
Hi, i agree, but it is only true, as long as there is a reference to the inline function. The text seems to suggest that although the reference to the inline function is gone, it still stays on memory. greetz JC On 10/24/06, Alias™ <[EMAIL PROTECTED]> wrote: I think the issue is that due to the use of inner functions, the parameters stay in memory, including the execution scope object. "The scope object as well as the extra parameters might have been deleted from the Delegate function object, but they still remain inside the inline function. Excuse me? Yes, this is true. Every single inline function created inside the Delegate.create() method stays on memory." HTH, Alias On 24/10/06, Hans Wichman <[EMAIL PROTECTED]> wrote: > > Hi, > exactly "The garbage collector will not remove references to delegates > that > are still being used". > Doesnt that mean that if you already nicely set your delegates to null, > you > are done? > > Example: > obj.ref = Delegate.create (otherObj, otherFunc); > > As long as obj.ref is in memory, otherObj and otherFunc will be too. > Now if I do obj.ref = null, the delegate can be removed, as will the > otherObj and otherFunc. > Since obj.ref pointed to the inner function, which held a reference to the > activation object containing otherObj and otherFunc, they couldnt be > removed > before, but after nulling the ref, they can? > > I did some other tests, to check if eg > function init() { > var myVar = 10; > obj.ref = Delegate.create ()... > } > > would cause myVar to be kept as well (as it would have been when you'd > done > obj.ref = function() {...}), but that was not the case. > > It seems to me the biggest pitfall would be code in which you'd go: > > function init(clip:MovieClip) { > //1:setup handlers here > //2:declare some variables here > //etc etc > > clip.onEnterFrame = function () { >//code goes here > } > } > > without relealizing, that becoz of the function assignment to clip, > everything you have done under //1 and //2 is still in memory, and that > you > should be aware of this. I don't see how lots and lots of delegates, whose > references are *appropriately released *will cause the problems described? > > greetz > JC > > > > > > On 10/24/06, Alias™ <[EMAIL PROTECTED]> wrote: > > > > The garbage collector will not remove references to delegates that are > > still > > being used - only ones that are no longer being referenced by anything > > else. > > It uses reference counting, so this will not cause any wierd > > > > That's a great article - although I now have to go through all my code > and > > figure out where I need to call Delegate.destroy()... I have a VJing app > > which gets more and more unreliable the longer it runs and I bet this is > > why. > > > > HTH, > > Alias > > > > > > > > On 24/10/06, Hans Wichman <[EMAIL PROTECTED] > wrote: > > > > > > Hi Dimitrios, > > > > > > i was reading your article and the referenced article in which it > says: > > > > > > Once the inner function is removed from memory (for instance if the > > object > > > to which the inner function was attached is removed), then the unique > > > reference to the activation object also gets deleted and the garbage > > > collector will (should) delete both the inner function and the > > activation > > > object of the outer function at the same time. > > > > > > Now the inner function is what is returned when you use > Delegate.create. > > > It > > > seems to me mostly when using a Delegate, you want it to have those > > > references until you dont need the delegate itself anymore. So setting > > the > > > reference to the inner function to null, should take care of the rest? > > I'm > > > probably missing something here. > > > > > > greetz > > > JC > > > > > > On 10/16/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello everyone, > > > > > > > > I had a really big issue recently, when I realized that the > > performance > > > of > > > > a large-scale game > > > > I built in Flash dropping substantially after 1/2 hour of gameplay, > to > > > the > > > > point where > > > > the game became wy too slow to play. > > > > > > > > After exhausting tests I found out that this was caused by the > > extended > > > > use of Delegates > > > > with parameters (I always make sure I don't leave garbage sitting > > around > > > > when I destroy > > > > objects of all of my classes, so that was not the issue). > > > > > > > > Spending one week on this, I managed to spot the problem and find a > > > > solution, > > > > writing a new Delegate class that was taking care of cleaning up > > > function > > > > objects. > > > > > > > > I thought this would interest quite a few people, so I wrote an > > article > > > on > > > > this. You can > > > > read at www.zefxis.gr/article-delegates. You can also download the > > > > Delegate class > > > > I wrote and use it for you projects. > > > > > > > > I would appreciate any comments on
Re: [FlashCoders] Delegates and performance
I think the issue is that due to the use of inner functions, the parameters stay in memory, including the execution scope object. "The scope object as well as the extra parameters might have been deleted from the Delegate function object, but they still remain inside the inline function. Excuse me? Yes, this is true. Every single inline function created inside the Delegate.create() method stays on memory." HTH, Alias On 24/10/06, Hans Wichman <[EMAIL PROTECTED]> wrote: Hi, exactly "The garbage collector will not remove references to delegates that are still being used". Doesnt that mean that if you already nicely set your delegates to null, you are done? Example: obj.ref = Delegate.create (otherObj, otherFunc); As long as obj.ref is in memory, otherObj and otherFunc will be too. Now if I do obj.ref = null, the delegate can be removed, as will the otherObj and otherFunc. Since obj.ref pointed to the inner function, which held a reference to the activation object containing otherObj and otherFunc, they couldnt be removed before, but after nulling the ref, they can? I did some other tests, to check if eg function init() { var myVar = 10; obj.ref = Delegate.create ()... } would cause myVar to be kept as well (as it would have been when you'd done obj.ref = function() {...}), but that was not the case. It seems to me the biggest pitfall would be code in which you'd go: function init(clip:MovieClip) { //1:setup handlers here //2:declare some variables here //etc etc clip.onEnterFrame = function () { //code goes here } } without relealizing, that becoz of the function assignment to clip, everything you have done under //1 and //2 is still in memory, and that you should be aware of this. I don't see how lots and lots of delegates, whose references are *appropriately released *will cause the problems described? greetz JC On 10/24/06, Alias™ <[EMAIL PROTECTED]> wrote: > > The garbage collector will not remove references to delegates that are > still > being used - only ones that are no longer being referenced by anything > else. > It uses reference counting, so this will not cause any wierd > > That's a great article - although I now have to go through all my code and > figure out where I need to call Delegate.destroy()... I have a VJing app > which gets more and more unreliable the longer it runs and I bet this is > why. > > HTH, > Alias > > > > On 24/10/06, Hans Wichman <[EMAIL PROTECTED] > wrote: > > > > Hi Dimitrios, > > > > i was reading your article and the referenced article in which it says: > > > > Once the inner function is removed from memory (for instance if the > object > > to which the inner function was attached is removed), then the unique > > reference to the activation object also gets deleted and the garbage > > collector will (should) delete both the inner function and the > activation > > object of the outer function at the same time. > > > > Now the inner function is what is returned when you use Delegate.create. > > It > > seems to me mostly when using a Delegate, you want it to have those > > references until you dont need the delegate itself anymore. So setting > the > > reference to the inner function to null, should take care of the rest? > I'm > > probably missing something here. > > > > greetz > > JC > > > > On 10/16/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: > > > > > > Hello everyone, > > > > > > I had a really big issue recently, when I realized that the > performance > > of > > > a large-scale game > > > I built in Flash dropping substantially after 1/2 hour of gameplay, to > > the > > > point where > > > the game became wy too slow to play. > > > > > > After exhausting tests I found out that this was caused by the > extended > > > use of Delegates > > > with parameters (I always make sure I don't leave garbage sitting > around > > > when I destroy > > > objects of all of my classes, so that was not the issue). > > > > > > Spending one week on this, I managed to spot the problem and find a > > > solution, > > > writing a new Delegate class that was taking care of cleaning up > > function > > > objects. > > > > > > I thought this would interest quite a few people, so I wrote an > article > > on > > > this. You can > > > read at www.zefxis.gr/article-delegates. You can also download the > > > Delegate class > > > I wrote and use it for you projects. > > > > > > I would appreciate any comments on this! > > > > > > Thanks, > > > > > > Dimtirios > > > > > > > > > > > > ___ > > > 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 > > > > > ___ > > Flashcod
Re: [FlashCoders] Delegates and performance
Hi, exactly "The garbage collector will not remove references to delegates that are still being used". Doesnt that mean that if you already nicely set your delegates to null, you are done? Example: obj.ref = Delegate.create (otherObj, otherFunc); As long as obj.ref is in memory, otherObj and otherFunc will be too. Now if I do obj.ref = null, the delegate can be removed, as will the otherObj and otherFunc. Since obj.ref pointed to the inner function, which held a reference to the activation object containing otherObj and otherFunc, they couldnt be removed before, but after nulling the ref, they can? I did some other tests, to check if eg function init() { var myVar = 10; obj.ref = Delegate.create ()... } would cause myVar to be kept as well (as it would have been when you'd done obj.ref = function() {...}), but that was not the case. It seems to me the biggest pitfall would be code in which you'd go: function init(clip:MovieClip) { //1:setup handlers here //2:declare some variables here //etc etc clip.onEnterFrame = function () { //code goes here } } without relealizing, that becoz of the function assignment to clip, everything you have done under //1 and //2 is still in memory, and that you should be aware of this. I don't see how lots and lots of delegates, whose references are *appropriately released *will cause the problems described? greetz JC On 10/24/06, Alias™ <[EMAIL PROTECTED]> wrote: The garbage collector will not remove references to delegates that are still being used - only ones that are no longer being referenced by anything else. It uses reference counting, so this will not cause any wierd That's a great article - although I now have to go through all my code and figure out where I need to call Delegate.destroy()... I have a VJing app which gets more and more unreliable the longer it runs and I bet this is why. HTH, Alias On 24/10/06, Hans Wichman <[EMAIL PROTECTED] > wrote: > > Hi Dimitrios, > > i was reading your article and the referenced article in which it says: > > Once the inner function is removed from memory (for instance if the object > to which the inner function was attached is removed), then the unique > reference to the activation object also gets deleted and the garbage > collector will (should) delete both the inner function and the activation > object of the outer function at the same time. > > Now the inner function is what is returned when you use Delegate.create. > It > seems to me mostly when using a Delegate, you want it to have those > references until you dont need the delegate itself anymore. So setting the > reference to the inner function to null, should take care of the rest? I'm > probably missing something here. > > greetz > JC > > On 10/16/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: > > > > Hello everyone, > > > > I had a really big issue recently, when I realized that the performance > of > > a large-scale game > > I built in Flash dropping substantially after 1/2 hour of gameplay, to > the > > point where > > the game became wy too slow to play. > > > > After exhausting tests I found out that this was caused by the extended > > use of Delegates > > with parameters (I always make sure I don't leave garbage sitting around > > when I destroy > > objects of all of my classes, so that was not the issue). > > > > Spending one week on this, I managed to spot the problem and find a > > solution, > > writing a new Delegate class that was taking care of cleaning up > function > > objects. > > > > I thought this would interest quite a few people, so I wrote an article > on > > this. You can > > read at www.zefxis.gr/article-delegates. You can also download the > > Delegate class > > I wrote and use it for you projects. > > > > I would appreciate any comments on this! > > > > Thanks, > > > > Dimtirios > > > > > > > > ___ > > 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 > ___ 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] Delegates and performance
Argh, pressed send too soon... I meant to say: The garbage collector will not remove references to delegates that are still being used - only ones that are no longer being referenced by anything else. It uses reference counting, so this will not cause any wierd vanishing function issues. HTH, Alias On 24/10/06, Hans Wichman <[EMAIL PROTECTED]> wrote: HI, well especially for game programming where you'd do a lot in the IDE and in code, FLASC or FlashDevelop would be great. Its not a question then of whether you should use one OR the other, its more a question of WHEN. I ussually use both the IDE and FlashDevelop or a batch at the same time. Like Steven said, if you change your library or timeline, export in the IDE, if you change the code, rebuilt in mtasc. Once you get used 1 second compile times, you never want to go back... greetz JC On 10/24/06, Alias™ <[EMAIL PROTECTED]> wrote: > > There's nothing wrong with using the IDE if it suits you better. > MTASC is cool, but you should use the right tool for the job. > If that's the IDE, then that's what you should use. > > Alias > > On 22/10/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: > > > > Yeah, I know that Steven. Unofrtunately I'm still using the IDE > > for some complex sprite animations, eventhough I know I shouldn't. > > > > The IDE compile time really sucks. I hope I'll start using MTASC soon. > > > > Thanks, > > > > Dimitrios > > > > > > - Original Message - > > From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> > > To: "Flashcoders mailing list" > > Sent: Friday, October 20, 2006 9:11 PM > > Subject: RE: [FlashCoders] Delegates and performance > > > > > > You should look into using MTASC via FLASC to compile your games. Since > > games are mostly code, you'll save yourself a ton of time by using > > MTASC. The difference in compile time is astounding. MTASC compiles in > > about one second when the IDE can take much longer. > > ___ > > 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 > > > ___ > 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 ___ 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] Delegates and performance
The garbage collector will not remove references to delegates that are still being used - only ones that are no longer being referenced by anything else. It uses reference counting, so this will not cause any wierd That's a great article - although I now have to go through all my code and figure out where I need to call Delegate.destroy()... I have a VJing app which gets more and more unreliable the longer it runs and I bet this is why. HTH, Alias On 24/10/06, Hans Wichman <[EMAIL PROTECTED]> wrote: Hi Dimitrios, i was reading your article and the referenced article in which it says: Once the inner function is removed from memory (for instance if the object to which the inner function was attached is removed), then the unique reference to the activation object also gets deleted and the garbage collector will (should) delete both the inner function and the activation object of the outer function at the same time. Now the inner function is what is returned when you use Delegate.create. It seems to me mostly when using a Delegate, you want it to have those references until you dont need the delegate itself anymore. So setting the reference to the inner function to null, should take care of the rest? I'm probably missing something here. greetz JC On 10/16/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: > > Hello everyone, > > I had a really big issue recently, when I realized that the performance of > a large-scale game > I built in Flash dropping substantially after 1/2 hour of gameplay, to the > point where > the game became wy too slow to play. > > After exhausting tests I found out that this was caused by the extended > use of Delegates > with parameters (I always make sure I don't leave garbage sitting around > when I destroy > objects of all of my classes, so that was not the issue). > > Spending one week on this, I managed to spot the problem and find a > solution, > writing a new Delegate class that was taking care of cleaning up function > objects. > > I thought this would interest quite a few people, so I wrote an article on > this. You can > read at www.zefxis.gr/article-delegates. You can also download the > Delegate class > I wrote and use it for you projects. > > I would appreciate any comments on this! > > Thanks, > > Dimtirios > > > > ___ > 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 ___ 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] Delegates and performance
HI, well especially for game programming where you'd do a lot in the IDE and in code, FLASC or FlashDevelop would be great. Its not a question then of whether you should use one OR the other, its more a question of WHEN. I ussually use both the IDE and FlashDevelop or a batch at the same time. Like Steven said, if you change your library or timeline, export in the IDE, if you change the code, rebuilt in mtasc. Once you get used 1 second compile times, you never want to go back... greetz JC On 10/24/06, Alias™ <[EMAIL PROTECTED]> wrote: There's nothing wrong with using the IDE if it suits you better. MTASC is cool, but you should use the right tool for the job. If that's the IDE, then that's what you should use. Alias On 22/10/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: > > Yeah, I know that Steven. Unofrtunately I'm still using the IDE > for some complex sprite animations, eventhough I know I shouldn't. > > The IDE compile time really sucks. I hope I'll start using MTASC soon. > > Thanks, > > Dimitrios > > > - Original Message - > From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> > To: "Flashcoders mailing list" > Sent: Friday, October 20, 2006 9:11 PM > Subject: RE: [FlashCoders] Delegates and performance > > > You should look into using MTASC via FLASC to compile your games. Since > games are mostly code, you'll save yourself a ton of time by using > MTASC. The difference in compile time is astounding. MTASC compiles in > about one second when the IDE can take much longer. > ___ > 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 > ___ 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] Delegates and performance
There's nothing wrong with using the IDE if it suits you better. MTASC is cool, but you should use the right tool for the job. If that's the IDE, then that's what you should use. Alias On 22/10/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: Yeah, I know that Steven. Unofrtunately I'm still using the IDE for some complex sprite animations, eventhough I know I shouldn't. The IDE compile time really sucks. I hope I'll start using MTASC soon. Thanks, Dimitrios - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Friday, October 20, 2006 9:11 PM Subject: RE: [FlashCoders] Delegates and performance You should look into using MTASC via FLASC to compile your games. Since games are mostly code, you'll save yourself a ton of time by using MTASC. The difference in compile time is astounding. MTASC compiles in about one second when the IDE can take much longer. ___ 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 ___ 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] Delegates and performance
Hi Dimitrios, i was reading your article and the referenced article in which it says: Once the inner function is removed from memory (for instance if the object to which the inner function was attached is removed), then the unique reference to the activation object also gets deleted and the garbage collector will (should) delete both the inner function and the activation object of the outer function at the same time. Now the inner function is what is returned when you use Delegate.create. It seems to me mostly when using a Delegate, you want it to have those references until you dont need the delegate itself anymore. So setting the reference to the inner function to null, should take care of the rest? I'm probably missing something here. greetz JC On 10/16/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: Hello everyone, I had a really big issue recently, when I realized that the performance of a large-scale game I built in Flash dropping substantially after 1/2 hour of gameplay, to the point where the game became wy too slow to play. After exhausting tests I found out that this was caused by the extended use of Delegates with parameters (I always make sure I don't leave garbage sitting around when I destroy objects of all of my classes, so that was not the issue). Spending one week on this, I managed to spot the problem and find a solution, writing a new Delegate class that was taking care of cleaning up function objects. I thought this would interest quite a few people, so I wrote an article on this. You can read at www.zefxis.gr/article-delegates. You can also download the Delegate class I wrote and use it for you projects. I would appreciate any comments on this! Thanks, Dimtirios ___ 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] Delegates and performance
Well, if you're not changing anything in the timeline(s) of the movie (such as those animations or new movieclips), and you're only making a change to the classes, then you'll definitely benefit from using FLASC for those compiles. ___ 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] Delegates and performance
Yeah, I know that Steven. Unofrtunately I'm still using the IDE for some complex sprite animations, eventhough I know I shouldn't. The IDE compile time really sucks. I hope I'll start using MTASC soon. Thanks, Dimitrios - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Friday, October 20, 2006 9:11 PM Subject: RE: [FlashCoders] Delegates and performance You should look into using MTASC via FLASC to compile your games. Since games are mostly code, you'll save yourself a ton of time by using MTASC. The difference in compile time is astounding. MTASC compiles in about one second when the IDE can take much longer. ___ 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] Delegates and performance
You should look into using MTASC via FLASC to compile your games. Since games are mostly code, you'll save yourself a ton of time by using MTASC. The difference in compile time is astounding. MTASC compiles in about one second when the IDE can take much longer. ___ 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] Delegates and performance
Thanks for poitning that out Tony. I mostly do games with Flash and haven't used MTASC, so I didn't know it does not compile. Dimitrios - Original Message - From: "Anthony Lee" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Friday, October 20, 2006 9:08 AM Subject: Re: [FlashCoders] Delegates and performance By the way Dimitrios, Your Delegate Class wouldn't compile with MTASC. ...com/zefxis/utils/Delegate.as:18: characters 3-12 : type error Local variable redefinition : _func Tony ___ 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] Delegates and performance
By the way Dimitrios, Your Delegate Class wouldn't compile with MTASC. ...com/zefxis/utils/Delegate.as:18: characters 3-12 : type error Local variable redefinition : _func Tony ___ 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] Delegates and performance
I thought this would interest quite a few people, so I wrote an article on this. I found your post to be a good practical example of implementing Timothee Groleau's article. Thank you. Tony ___ 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] Delegates and performance
This has come up before and there should be some stuff in the archives http://muzakdeezign.com/flashcoders/?q=delegate%20garbage%20collection http://muzakdeezign.com/flashcoders/?q=cleaning%20up%20delegate >From 2 years ago: http://www.peterjoel.com/blog/index.php?archive=2004_08_01_archive.xml regards, Muzak - Original Message - From: "Dimitrios Bendilas" <[EMAIL PROTECTED]> To: Sent: Monday, October 16, 2006 8:49 PM Subject: [FlashCoders] Delegates and performance Hello everyone, I had a really big issue recently, when I realized that the performance of a large-scale game I built in Flash dropping substantially after 1/2 hour of gameplay, to the point where the game became wy too slow to play. After exhausting tests I found out that this was caused by the extended use of Delegates with parameters (I always make sure I don't leave garbage sitting around when I destroy objects of all of my classes, so that was not the issue). Spending one week on this, I managed to spot the problem and find a solution, writing a new Delegate class that was taking care of cleaning up function objects. I thought this would interest quite a few people, so I wrote an article on this. You can read at www.zefxis.gr/article-delegates. You can also download the Delegate class I wrote and use it for you projects. I would appreciate any comments on this! Thanks, Dimtirios ___ 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] Delegates and performance
Hi, very interesting, ill be sure to test this out! greetz JC On 10/16/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote: Hello everyone, I had a really big issue recently, when I realized that the performance of a large-scale game I built in Flash dropping substantially after 1/2 hour of gameplay, to the point where the game became wy too slow to play. After exhausting tests I found out that this was caused by the extended use of Delegates with parameters (I always make sure I don't leave garbage sitting around when I destroy objects of all of my classes, so that was not the issue). Spending one week on this, I managed to spot the problem and find a solution, writing a new Delegate class that was taking care of cleaning up function objects. I thought this would interest quite a few people, so I wrote an article on this. You can read at www.zefxis.gr/article-delegates. You can also download the Delegate class I wrote and use it for you projects. I would appreciate any comments on this! Thanks, Dimtirios ___ 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
[FlashCoders] Delegates and performance
Hello everyone, I had a really big issue recently, when I realized that the performance of a large-scale game I built in Flash dropping substantially after 1/2 hour of gameplay, to the point where the game became wy too slow to play. After exhausting tests I found out that this was caused by the extended use of Delegates with parameters (I always make sure I don't leave garbage sitting around when I destroy objects of all of my classes, so that was not the issue). Spending one week on this, I managed to spot the problem and find a solution, writing a new Delegate class that was taking care of cleaning up function objects. I thought this would interest quite a few people, so I wrote an article on this. You can read at www.zefxis.gr/article-delegates. You can also download the Delegate class I wrote and use it for you projects. I would appreciate any comments on this! Thanks, Dimtirios ___ 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