Memory leak and performance optimization


(Ivan Ross) #1

Hello.

What methods can be used to find memory leaks and performance optimization? How can I track pieces of code which causes FPS decrease in FlashPunk project?

Thank you.


(Martí Angelats i Ribera) #2

The first thing that comes to my mind when someone says memory leak is to use the recycle functionallity. Also be sure to not be using unused entities.

For performance optimitzation i’d say it’s the same as any other AS3 project. But i recomend to finish the project and be sure it works before starting any mid-low level optimitzation becouse some times they decrease the code readability.


(rostok) #3

First of all there is “The Miner” http://www.sociodox.com/theminer/ and there’s the Adobe Scout https://creative.adobe.com/en/products/scout. Another approach which gave me pretty good results was to create my own SimpleProfiler class, that measured time of execution for each critical method. I will provide the source if you need it but frankly don’t know if this DIY tinkering is proper.

Remember that there’s also pretty good method of finding real bottle neck by random stopping the code and checking the stack trace. Eventually you should narrow the culprit.


(Ivan Ross) #4

Thank you guys!

Will try it.